summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2006-08-01 19:03:11 +0000
committerBruce Momjian <bruce@momjian.us>2006-08-01 19:03:11 +0000
commit2c6d96cef6c9d9a1a8bf80c5f6a761d29f7a2a47 (patch)
treef26a1a8ee27eaf0008673ccc6d2ca9180d88c9cd /src/include
parentc61607bd52d84bc543f451ea27c22e8212a48b24 (diff)
downloadpostgresql-2c6d96cef6c9d9a1a8bf80c5f6a761d29f7a2a47.tar.gz
Add support for loadable modules to allocated shared memory and
lightweight locks. Marc Munro
Diffstat (limited to 'src/include')
-rw-r--r--src/include/storage/lwlock.h4
-rw-r--r--src/include/storage/pg_shmem.h9
-rw-r--r--src/include/storage/shmem.h7
3 files changed, 17 insertions, 3 deletions
diff --git a/src/include/storage/lwlock.h b/src/include/storage/lwlock.h
index ce77993243..5c4db52892 100644
--- a/src/include/storage/lwlock.h
+++ b/src/include/storage/lwlock.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/lwlock.h,v 1.30 2006/07/23 23:08:46 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/storage/lwlock.h,v 1.31 2006/08/01 19:03:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -92,4 +92,6 @@ extern int NumLWLocks(void);
extern Size LWLockShmemSize(void);
extern void CreateLWLocks(void);
+extern void RegisterAddinLWLock(LWLockId *lock);
+
#endif /* LWLOCK_H */
diff --git a/src/include/storage/pg_shmem.h b/src/include/storage/pg_shmem.h
index 7a89f31820..47f6709a67 100644
--- a/src/include/storage/pg_shmem.h
+++ b/src/include/storage/pg_shmem.h
@@ -17,7 +17,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/pg_shmem.h,v 1.18 2006/03/05 15:58:59 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/storage/pg_shmem.h,v 1.19 2006/08/01 19:03:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -51,4 +51,11 @@ extern PGShmemHeader *PGSharedMemoryCreate(Size size, bool makePrivate,
extern bool PGSharedMemoryIsInUse(unsigned long id1, unsigned long id2);
extern void PGSharedMemoryDetach(void);
+
+extern void RegisterAddinContext(const char *name, Size size);
+extern Size AddinShmemSize(void);
+extern void InitAddinContexts(void * start);
+extern void *ShmemAllocFromContext(Size size, const char *name);
+extern void ShmemResetContext(const char *name);
+
#endif /* PG_SHMEM_H */
diff --git a/src/include/storage/shmem.h b/src/include/storage/shmem.h
index 96a67b069a..bd55fbdb5c 100644
--- a/src/include/storage/shmem.h
+++ b/src/include/storage/shmem.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/shmem.h,v 1.47 2006/03/05 15:59:00 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/storage/shmem.h,v 1.48 2006/08/01 19:03:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -38,6 +38,11 @@ typedef unsigned long SHMEM_OFFSET;
extern DLLIMPORT SHMEM_OFFSET ShmemBase;
+/* coerce an offset into a pointer in a specified address space. This
+ * macro (only) is not confined to the primary shared memory region */
+#define MAKE_PTRFROM(base,xx_offs)\
+ (base+((unsigned long)(xx_offs)))
+
/* coerce an offset into a pointer in this process's address space */
#define MAKE_PTR(xx_offs)\
(ShmemBase+((unsigned long)(xx_offs)))