mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
Clean up comments.
This commit is contained in:
@ -1,16 +1,12 @@
|
|||||||
/*-------------------------------------------------------------------------
|
/*-------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* buf_internals.h
|
* buf_internals.h
|
||||||
* Internal definitions.
|
* Internal definitions for buffer manager.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: buf_internals.h,v 1.33 1999/09/24 00:25:27 tgl Exp $
|
* $Id: buf_internals.h,v 1.34 1999/11/21 19:56:12 tgl Exp $
|
||||||
*
|
|
||||||
* NOTE
|
|
||||||
* If BUFFERPAGE0 is defined, then 0 will be used as a
|
|
||||||
* valid buffer page number.
|
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -42,18 +38,14 @@ extern int Num_Descriptors;
|
|||||||
|
|
||||||
typedef bits16 BufFlags;
|
typedef bits16 BufFlags;
|
||||||
|
|
||||||
typedef struct sbufdesc BufferDesc;
|
|
||||||
typedef struct sbufdesc BufferHdr;
|
|
||||||
typedef struct buftag BufferTag;
|
|
||||||
|
|
||||||
/* long * so alignment will be correct */
|
/* long * so alignment will be correct */
|
||||||
typedef long **BufferBlock;
|
typedef long **BufferBlock;
|
||||||
|
|
||||||
struct buftag
|
typedef struct buftag
|
||||||
{
|
{
|
||||||
LockRelId relId;
|
LockRelId relId;
|
||||||
BlockNumber blockNum; /* blknum relative to begin of reln */
|
BlockNumber blockNum; /* blknum relative to begin of reln */
|
||||||
};
|
} BufferTag;
|
||||||
|
|
||||||
#define CLEAR_BUFFERTAG(a) \
|
#define CLEAR_BUFFERTAG(a) \
|
||||||
( \
|
( \
|
||||||
@ -72,7 +64,7 @@ struct buftag
|
|||||||
#define INVALID_DESCRIPTOR (-3)
|
#define INVALID_DESCRIPTOR (-3)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* struct sbufdesc -- shared buffer cache metadata for a single
|
* BufferDesc -- shared buffer cache metadata for a single
|
||||||
* shared buffer descriptor.
|
* shared buffer descriptor.
|
||||||
*
|
*
|
||||||
* We keep the name of the database and relation in which this
|
* We keep the name of the database and relation in which this
|
||||||
@ -83,9 +75,9 @@ struct buftag
|
|||||||
* Dbname, relname, dbid, and relid are enough to determine where
|
* Dbname, relname, dbid, and relid are enough to determine where
|
||||||
* to put the buffer, for all storage managers.
|
* to put the buffer, for all storage managers.
|
||||||
*/
|
*/
|
||||||
struct sbufdesc
|
typedef struct sbufdesc
|
||||||
{
|
{
|
||||||
Buffer freeNext; /* link for freelist chain */
|
Buffer freeNext; /* links for freelist chain */
|
||||||
Buffer freePrev;
|
Buffer freePrev;
|
||||||
SHMEM_OFFSET data; /* pointer to data in buf pool */
|
SHMEM_OFFSET data; /* pointer to data in buf pool */
|
||||||
|
|
||||||
@ -93,7 +85,7 @@ struct sbufdesc
|
|||||||
BufferTag tag; /* file/block identifier */
|
BufferTag tag; /* file/block identifier */
|
||||||
int buf_id; /* maps global desc to local desc */
|
int buf_id; /* maps global desc to local desc */
|
||||||
|
|
||||||
BufFlags flags; /* described below */
|
BufFlags flags; /* see bit definitions above */
|
||||||
unsigned refcount; /* # of times buffer is pinned */
|
unsigned refcount; /* # of times buffer is pinned */
|
||||||
|
|
||||||
#ifdef HAS_TEST_AND_SET
|
#ifdef HAS_TEST_AND_SET
|
||||||
@ -107,10 +99,12 @@ struct sbufdesc
|
|||||||
|
|
||||||
char sb_dbname[NAMEDATALEN]; /* name of db in which buf belongs */
|
char sb_dbname[NAMEDATALEN]; /* name of db in which buf belongs */
|
||||||
char sb_relname[NAMEDATALEN]; /* name of reln */
|
char sb_relname[NAMEDATALEN]; /* name of reln */
|
||||||
};
|
} BufferDesc;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Buffer lock infos in BufferLocks below.
|
* Each backend has its own BufferLocks[] array holding flag bits
|
||||||
|
* showing what locks it has set on each buffer.
|
||||||
|
*
|
||||||
* We have to free these locks in elog(ERROR)...
|
* We have to free these locks in elog(ERROR)...
|
||||||
*/
|
*/
|
||||||
#define BL_IO_IN_PROGRESS (1 << 0) /* unimplemented */
|
#define BL_IO_IN_PROGRESS (1 << 0) /* unimplemented */
|
||||||
|
Reference in New Issue
Block a user