diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/miscadmin.h | 9 | ||||
-rw-r--r-- | src/include/storage/buf_internals.h | 38 |
2 files changed, 11 insertions, 36 deletions
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h index 492f16cc115..d5b509fe511 100644 --- a/src/include/miscadmin.h +++ b/src/include/miscadmin.h @@ -12,7 +12,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: miscadmin.h,v 1.135 2003/11/13 00:40:01 wieck Exp $ + * $Id: miscadmin.h,v 1.136 2003/11/13 05:34:58 wieck Exp $ * * NOTES * some of the information in this file should be moved to @@ -96,13 +96,6 @@ extern void ProcessInterrupts(void); CritSectionCount--; \ } while(0) -#define PG_DELAY(_msec) \ -{ \ - struct timeval delay; \ - delay.tv_sec = (_msec) / 1000; \ - delay.tv_usec = ((_msec) % 1000) * 1000; \ - (void) select(0, NULL, NULL, NULL, &delay); \ -} /***************************************************************************** * globals.h -- * diff --git a/src/include/storage/buf_internals.h b/src/include/storage/buf_internals.h index deafa0b8cec..7b797513392 100644 --- a/src/include/storage/buf_internals.h +++ b/src/include/storage/buf_internals.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: buf_internals.h,v 1.62 2003/11/13 00:40:02 wieck Exp $ + * $Id: buf_internals.h,v 1.63 2003/11/13 05:34:58 wieck Exp $ * *------------------------------------------------------------------------- */ @@ -72,29 +72,17 @@ typedef struct buftag (a)->rnode = (xx_reln)->rd_node \ ) -#define BUFFERTAG_EQUALS(a,xx_reln,xx_blockNum) \ -( \ - (a)->rnode.tblNode == (xx_reln)->rd_node.tblNode && \ - (a)->rnode.relNode == (xx_reln)->rd_node.relNode && \ - (a)->blockNum == (xx_blockNum) \ -) -#define BUFFERTAGS_EQUAL(a,b) \ -( \ - (a)->rnode.tblNode == (b)->rnode.tblNode && \ - (a)->rnode.relNode == (b)->rnode.relNode && \ - (a)->blockNum == (b)->blockNum \ -) - /* * BufferDesc -- shared buffer cache metadata for a single * shared buffer descriptor. */ typedef struct sbufdesc { - Buffer bufNext; /* link in freelist chain */ + Buffer freeNext; /* links for freelist chain */ + Buffer freePrev; SHMEM_OFFSET data; /* pointer to data in buf pool */ - /* tag and id must be together for table lookup */ + /* tag and id must be together for table lookup (still true?) */ BufferTag tag; /* file/block identifier */ int buf_id; /* buffer's index number (from 0) */ @@ -119,7 +107,6 @@ typedef struct sbufdesc #define BufferDescriptorGetBuffer(bdesc) ((bdesc)->buf_id + 1) - /* * Each backend has its own BufferLocks[] array holding flag bits * showing what locks it has set on each buffer. @@ -180,19 +167,14 @@ extern long int LocalBufferFlushCount; /*freelist.c*/ extern void PinBuffer(BufferDesc *buf); extern void UnpinBuffer(BufferDesc *buf); -extern BufferDesc *StrategyBufferLookup(BufferTag *tagPtr, bool recheck); -extern BufferDesc *StrategyGetBuffer(void); -extern void StrategyReplaceBuffer(BufferDesc *buf, Relation rnode, BlockNumber blockNum); -extern void StrategyInvalidateBuffer(BufferDesc *buf); -extern void StrategyHintVacuum(bool vacuum_active); -extern int StrategyDirtyBufferList(int *buffer_dirty, int max_buffers); -extern void StrategyInitialize(bool init); +extern BufferDesc *GetFreeBuffer(void); +extern void InitFreeList(bool init); /* buf_table.c */ -extern void InitBufTable(int size); -extern int BufTableLookup(BufferTag *tagPtr); -extern bool BufTableInsert(BufferTag *tagPtr, Buffer buf_id); -extern bool BufTableDelete(BufferTag *tagPtr); +extern void InitBufTable(void); +extern BufferDesc *BufTableLookup(BufferTag *tagPtr); +extern bool BufTableDelete(BufferDesc *buf); +extern bool BufTableInsert(BufferDesc *buf); /* bufmgr.c */ extern BufferDesc *BufferDescriptors; |