aboutsummaryrefslogtreecommitdiff
path: root/src/include/storage
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/storage')
-rw-r--r--src/include/storage/buf_internals.h6
-rw-r--r--src/include/storage/bufmgr.h4
-rw-r--r--src/include/storage/freespace.h4
-rw-r--r--src/include/storage/lock.h4
-rw-r--r--src/include/storage/lwlock.h4
-rw-r--r--src/include/storage/pg_shmem.h10
-rw-r--r--src/include/storage/proc.h4
-rw-r--r--src/include/storage/procarray.h4
-rw-r--r--src/include/storage/shmem.h5
-rw-r--r--src/include/storage/sinval.h6
-rw-r--r--src/include/storage/sinvaladt.h4
11 files changed, 28 insertions, 27 deletions
diff --git a/src/include/storage/buf_internals.h b/src/include/storage/buf_internals.h
index 2bd210dfb52..6e083be21ba 100644
--- a/src/include/storage/buf_internals.h
+++ b/src/include/storage/buf_internals.h
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/buf_internals.h,v 1.78 2005/05/19 21:35:47 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/storage/buf_internals.h,v 1.79 2005/08/20 23:26:33 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -182,11 +182,11 @@ extern long int LocalBufferFlushCount;
extern BufferDesc *StrategyGetBuffer(void);
extern void StrategyFreeBuffer(BufferDesc *buf, bool at_head);
extern int StrategySyncStart(void);
-extern int StrategyShmemSize(void);
+extern Size StrategyShmemSize(void);
extern void StrategyInitialize(bool init);
/* buf_table.c */
-extern int BufTableShmemSize(int size);
+extern Size BufTableShmemSize(int size);
extern void InitBufTable(int size);
extern int BufTableLookup(BufferTag *tagPtr);
extern int BufTableInsert(BufferTag *tagPtr, int buf_id);
diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h
index a88565e1596..63def4a2e29 100644
--- a/src/include/storage/bufmgr.h
+++ b/src/include/storage/bufmgr.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/bufmgr.h,v 1.95 2005/08/12 05:05:51 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/storage/bufmgr.h,v 1.96 2005/08/20 23:26:33 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -140,7 +140,7 @@ extern void DropBuffers(Oid dbid);
#ifdef NOT_USED
extern void PrintPinnedBufs(void);
#endif
-extern int BufferShmemSize(void);
+extern Size BufferShmemSize(void);
extern RelFileNode BufferGetFileNode(Buffer buffer);
extern void SetBufferCommitInfoNeedsSave(Buffer buffer);
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index fe6cca76bcd..1ce7b7f08ae 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/freespace.h,v 1.17 2004/12/31 22:03:42 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/storage/freespace.h,v 1.18 2005/08/20 23:26:33 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -37,7 +37,7 @@ extern int MaxFSMPages;
* function prototypes
*/
extern void InitFreeSpaceMap(void);
-extern int FreeSpaceShmemSize(void);
+extern Size FreeSpaceShmemSize(void);
extern BlockNumber GetPageWithFreeSpace(RelFileNode *rel, Size spaceNeeded);
extern BlockNumber RecordAndGetPageWithFreeSpace(RelFileNode *rel,
diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h
index e434683d0e5..6610b1381b7 100644
--- a/src/include/storage/lock.h
+++ b/src/include/storage/lock.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/lock.h,v 1.89 2005/06/17 22:32:50 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/storage/lock.h,v 1.90 2005/08/20 23:26:33 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -391,7 +391,7 @@ extern int LockCheckConflicts(LockMethod lockMethodTable,
extern void GrantLock(LOCK *lock, PROCLOCK *proclock, LOCKMODE lockmode);
extern void GrantAwaitedLock(void);
extern void RemoveFromWaitQueue(PGPROC *proc);
-extern int LockShmemSize(void);
+extern Size LockShmemSize(void);
extern bool DeadLockCheck(PGPROC *proc);
extern void DeadLockReport(void);
extern void RememberSimpleDeadLock(PGPROC *proc1,
diff --git a/src/include/storage/lwlock.h b/src/include/storage/lwlock.h
index 16c369117c7..98d1d40ad53 100644
--- a/src/include/storage/lwlock.h
+++ b/src/include/storage/lwlock.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/lwlock.h,v 1.21 2005/07/27 08:05:36 neilc Exp $
+ * $PostgreSQL: pgsql/src/include/storage/lwlock.h,v 1.22 2005/08/20 23:26:34 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -73,7 +73,7 @@ extern void LWLockReleaseAll(void);
extern bool LWLockHeldByMe(LWLockId lockid);
extern int NumLWLocks(void);
-extern int LWLockShmemSize(void);
+extern Size LWLockShmemSize(void);
extern void CreateLWLocks(void);
#endif /* LWLOCK_H */
diff --git a/src/include/storage/pg_shmem.h b/src/include/storage/pg_shmem.h
index ea7ecd16a97..c034e19ce4b 100644
--- a/src/include/storage/pg_shmem.h
+++ b/src/include/storage/pg_shmem.h
@@ -17,7 +17,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/pg_shmem.h,v 1.14 2004/12/31 22:03:42 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/storage/pg_shmem.h,v 1.15 2005/08/20 23:26:34 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -29,8 +29,8 @@ typedef struct PGShmemHeader /* standard header for all Postgres shmem */
int32 magic; /* magic # to identify Postgres segments */
#define PGShmemMagic 679834893
pid_t creatorPID; /* PID of creating process */
- uint32 totalsize; /* total size of segment */
- uint32 freeoffset; /* offset to first free space */
+ Size totalsize; /* total size of segment */
+ Size freeoffset; /* offset to first free space */
#ifndef WIN32 /* Windows doesn't have useful inode#s */
dev_t device; /* device data directory is on */
ino_t inode; /* inode number of data directory */
@@ -45,8 +45,8 @@ extern void *UsedShmemSegAddr;
extern void PGSharedMemoryReAttach(void);
#endif
-extern PGShmemHeader *PGSharedMemoryCreate(uint32 size, bool makePrivate,
- int port);
+extern PGShmemHeader *PGSharedMemoryCreate(Size size, bool makePrivate,
+ int port);
extern bool PGSharedMemoryIsInUse(unsigned long id1, unsigned long id2);
extern void PGSharedMemoryDetach(void);
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h
index 63090de1cfd..b9c9c5d5be6 100644
--- a/src/include/storage/proc.h
+++ b/src/include/storage/proc.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/proc.h,v 1.80 2005/07/31 17:19:22 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/storage/proc.h,v 1.81 2005/08/20 23:26:34 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -122,7 +122,7 @@ extern int StatementTimeout;
* Function Prototypes
*/
extern int ProcGlobalSemas(void);
-extern int ProcGlobalShmemSize(void);
+extern Size ProcGlobalShmemSize(void);
extern void InitProcGlobal(void);
extern void InitProcess(void);
extern void InitDummyProcess(int proctype);
diff --git a/src/include/storage/procarray.h b/src/include/storage/procarray.h
index af1209d2192..1c010ff5b00 100644
--- a/src/include/storage/procarray.h
+++ b/src/include/storage/procarray.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/procarray.h,v 1.4 2005/08/20 01:26:29 ishii Exp $
+ * $PostgreSQL: pgsql/src/include/storage/procarray.h,v 1.5 2005/08/20 23:26:34 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,7 +17,7 @@
#include "storage/lock.h"
-extern int ProcArrayShmemSize(void);
+extern Size ProcArrayShmemSize(void);
extern void CreateSharedProcArray(void);
extern void ProcArrayAdd(PGPROC *proc);
extern void ProcArrayRemove(PGPROC *proc);
diff --git a/src/include/storage/shmem.h b/src/include/storage/shmem.h
index 417b7b65e9a..520f8eb3adf 100644
--- a/src/include/storage/shmem.h
+++ b/src/include/storage/shmem.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/shmem.h,v 1.44 2004/12/31 22:03:42 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/storage/shmem.h,v 1.45 2005/08/20 23:26:35 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -68,7 +68,8 @@ extern void InitShmemIndex(void);
extern HTAB *ShmemInitHash(const char *name, long init_size, long max_size,
HASHCTL *infoP, int hash_flags);
extern void *ShmemInitStruct(const char *name, Size size, bool *foundPtr);
-
+extern Size add_size(Size s1, Size s2);
+extern Size mul_size(Size s1, Size s2);
/* size constants for the shmem index table */
/* max size of data structure string name */
diff --git a/src/include/storage/sinval.h b/src/include/storage/sinval.h
index 0f4c0f68f3f..2fe0cce8366 100644
--- a/src/include/storage/sinval.h
+++ b/src/include/storage/sinval.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/sinval.h,v 1.41 2005/05/19 21:35:47 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/storage/sinval.h,v 1.42 2005/08/20 23:26:35 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -83,8 +83,8 @@ typedef union
} SharedInvalidationMessage;
-extern int SInvalShmemSize(int maxBackends);
-extern void CreateSharedInvalidationState(int maxBackends);
+extern Size SInvalShmemSize(void);
+extern void CreateSharedInvalidationState(void);
extern void InitBackendSharedInvalidationState(void);
extern void SendSharedInvalidMessage(SharedInvalidationMessage *msg);
diff --git a/src/include/storage/sinvaladt.h b/src/include/storage/sinvaladt.h
index 0be6a386508..7d1f5f46855 100644
--- a/src/include/storage/sinvaladt.h
+++ b/src/include/storage/sinvaladt.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/sinvaladt.h,v 1.38 2005/05/19 21:35:47 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/storage/sinvaladt.h,v 1.39 2005/08/20 23:26:35 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -107,7 +107,7 @@ extern SISeg *shmInvalBuffer; /* pointer to the shared inval buffer */
/*
* prototypes for functions in sinvaladt.c
*/
-extern void SIBufferInit(int maxBackends);
+extern void SIBufferInit(void);
extern int SIBackendInit(SISeg *segP);
extern bool SIInsertDataEntry(SISeg *segP, SharedInvalidationMessage *data);