#include "postgres.h"
#include <signal.h>
#include <unistd.h>
#include <sys/file.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#include <sys/stat.h>
#include "miscadmin.h"
#include "storage/ipc.h"
#include "storage/pg_sema.h"
#include "storage/shmem.h"
Go to the source code of this file.
Definition at line 56 of file sysv_sema.c.
Definition at line 58 of file sysv_sema.c.
Definition at line 54 of file sysv_sema.c.
Definition at line 46 of file sysv_sema.c.
Definition at line 45 of file sysv_sema.c.
Definition at line 97 of file sysv_sema.c.
References EIDRM, ereport, errdetail(), errhint(), errmsg(), FATAL, IPC_CREAT, IPC_EXCL, IPCProtection, and numSems.
Referenced by IpcSemaphoreCreate().
Definition at line 223 of file sysv_sema.c.
References InternalIpcSemaphoreCreate(), IPC_RMID, IpcSemaphoreGetLastPID(), IpcSemaphoreGetValue(), IpcSemaphoreInitialize(), kill, nextSemaKey, numSems, PGSemaMagic, PGSemaphoreUnlock(), and semun::val.
Referenced by PGSemaphoreCreate().
Definition at line 203 of file sysv_sema.c.
References GETPID, and semun::val.
Referenced by IpcSemaphoreCreate().
Definition at line 192 of file sysv_sema.c.
References GETVAL, and semun::val.
Referenced by IpcSemaphoreCreate().
Definition at line 157 of file sysv_sema.c.
References ereport, errhint(), errmsg_internal(), FATAL, SETVAL, semun::val, and value.
Referenced by IpcSemaphoreCreate(), PGSemaphoreCreate(), and PGSemaphoreReset().
Definition at line 180 of file sysv_sema.c.
References elog, IPC_RMID, LOG, and semun::val.
Referenced by ReleaseSemaphores().
Definition at line 330 of file sysv_sema.c.
References DataDir, elog, ereport, errcode_for_file_access(), errmsg(), FATAL, malloc, maxSemaSets, maxSharedSemas, mySemaSets, nextSemaKey, nextSemaNumber, numSemaSets, numSharedSemas, on_shmem_exit(), PANIC, PGSemaphoreShmemSize(), ReleaseSemaphores(), SEMAS_PER_SET, sharedSemas, ShmemAllocUnlocked(), stat::st_ino, and stat.
Definition at line 388 of file sysv_sema.c.
References Assert(), elog, IpcSemaphoreCreate(), IpcSemaphoreInitialize(), IsUnderPostmaster, maxSemaSets, maxSharedSemas, mySemaSets, nextSemaNumber, numSemaSets, numSharedSemas, PANIC, SEMAS_PER_SET, PGSemaphoreData::semId, PGSemaphoreData::semNum, and sharedSemas.
Definition at line 434 of file sysv_sema.c.
References EINTR, elog, FATAL, PGSemaphoreData::semId, and PGSemaphoreData::semNum.
Definition at line 423 of file sysv_sema.c.
References IpcSemaphoreInitialize(), PGSemaphoreData::semId, and PGSemaphoreData::semNum.
Definition at line 307 of file sysv_sema.c.
References mul_size().
Referenced by PGReserveSemaphores().
Definition at line 497 of file sysv_sema.c.
References EAGAIN, EINTR, elog, EWOULDBLOCK, FATAL, IPC_NOWAIT, PGSemaphoreData::semId, and PGSemaphoreData::semNum.
Definition at line 467 of file sysv_sema.c.
References EINTR, elog, FATAL, PGSemaphoreData::semId, and PGSemaphoreData::semNum.
Referenced by IpcSemaphoreCreate().
Definition at line 373 of file sysv_sema.c.
References free, i, IpcSemaphoreKill(), mySemaSets, and numSemaSets.
Referenced by PGReserveSemaphores().
Definition at line 66 of file sysv_sema.c.
Referenced by PGReserveSemaphores(), and PGSemaphoreCreate().
Definition at line 63 of file sysv_sema.c.
Referenced by PGReserveSemaphores(), and PGSemaphoreCreate().
Definition at line 64 of file sysv_sema.c.
Referenced by PGReserveSemaphores(), PGSemaphoreCreate(), and ReleaseSemaphores().
Definition at line 67 of file sysv_sema.c.
Referenced by IpcSemaphoreCreate(), and PGReserveSemaphores().
Definition at line 68 of file sysv_sema.c.
Referenced by PGReserveSemaphores(), and PGSemaphoreCreate().
Definition at line 65 of file sysv_sema.c.
Referenced by PGReserveSemaphores(), PGSemaphoreCreate(), and ReleaseSemaphores().
Definition at line 62 of file sysv_sema.c.
Referenced by PGReserveSemaphores(), and PGSemaphoreCreate().
Definition at line 61 of file sysv_sema.c.
Referenced by PGReserveSemaphores(), and PGSemaphoreCreate().