⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pg_shmem.h

📁 PostgreSQL 8.1.4的源码 适用于Linux下的开源数据库系统
💻 H
字号:
/*------------------------------------------------------------------------- * * pg_shmem.h *	  Platform-independent API for shared memory support. * * Every port is expected to support shared memory with approximately * SysV-ish semantics; in particular, a memory block is not anonymous * but has an ID, and we must be able to tell whether there are any * remaining processes attached to a block of a specified ID. * * To simplify life for the SysV implementation, the ID is assumed to * consist of two unsigned long values (these are key and ID in SysV * terms).	Other platforms may ignore the second value if they need * only one ID number. * * * 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.16 2005/10/15 02:49:46 momjian Exp $ * *------------------------------------------------------------------------- */#ifndef PG_SHMEM_H#define PG_SHMEM_Htypedef 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 */	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 */#endif} PGShmemHeader;#ifdef EXEC_BACKENDextern unsigned long UsedShmemSegID;extern void *UsedShmemSegAddr;extern void PGSharedMemoryReAttach(void);#endifextern PGShmemHeader *PGSharedMemoryCreate(Size size, bool makePrivate,					 int port);extern bool PGSharedMemoryIsInUse(unsigned long id1, unsigned long id2);extern void PGSharedMemoryDetach(void);#endif   /* PG_SHMEM_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -