diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/libpq/pqsignal.h | 24 | ||||
| -rw-r--r-- | src/include/miscadmin.h | 25 | ||||
| -rw-r--r-- | src/include/storage/ipc.h | 8 | ||||
| -rw-r--r-- | src/include/storage/spin.h | 6 | ||||
| -rw-r--r-- | src/include/tcop/tcopprot.h | 3 |
5 files changed, 45 insertions, 21 deletions
diff --git a/src/include/libpq/pqsignal.h b/src/include/libpq/pqsignal.h index 08da41d652..be521ffe8d 100644 --- a/src/include/libpq/pqsignal.h +++ b/src/include/libpq/pqsignal.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pqsignal.h,v 1.9 1999/02/13 23:21:36 momjian Exp $ + * $Id: pqsignal.h,v 1.10 1999/10/06 21:58:16 vadim Exp $ * * NOTES * This shouldn't be in libpq, but the monitor and some other @@ -17,6 +17,28 @@ #ifndef PQSIGNAL_H #define PQSIGNAL_H +#ifdef HAVE_SIGPROCMASK +extern sigset_t UnBlockSig, + BlockSig; +#define PG_INITMASK() ( \ + sigemptyset(&UnBlockSig), \ + sigfillset(&BlockSig) \ + ) +#define PG_SETMASK(mask) sigprocmask(SIG_SETMASK, mask, NULL) +#else +extern int UnBlockSig, + BlockSig; +#define PG_INITMASK() ( \ + UnBlockSig = 0, \ + BlockSig = sigmask(SIGHUP) | sigmask(SIGQUIT) | \ + sigmask(SIGTERM) | sigmask(SIGALRM) | \ + sigmask(SIGINT) | sigmask(SIGUSR1) | \ + sigmask(SIGUSR2) | sigmask(SIGCHLD) | \ + sigmask(SIGWINCH) | sigmask(SIGFPE) \ + ) +#define PG_SETMASK(mask) sigsetmask(*((int*)(mask))) +#endif + typedef void (*pqsigfunc) (int); extern pqsigfunc pqsignal(int signo, pqsigfunc func); diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h index 12eb3f87ba..9faaac1bde 100644 --- a/src/include/miscadmin.h +++ b/src/include/miscadmin.h @@ -11,7 +11,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: miscadmin.h,v 1.42 1999/09/27 20:27:26 momjian Exp $ + * $Id: miscadmin.h,v 1.43 1999/10/06 21:58:13 vadim Exp $ * * NOTES * some of the information in this file will be moved to @@ -143,28 +143,25 @@ extern int CheckPathAccess(char *path, char *name, int open_mode); *****************************************************************************/ /* * Description: - * There are four processing modes in POSTGRES. They are NoProcessing - * or "none," BootstrapProcessing or "bootstrap," InitProcessing or + * There are three processing modes in POSTGRES. They are + * "BootstrapProcessing or "bootstrap," InitProcessing or * "initialization," and NormalProcessing or "normal." * - * If a POSTGRES binary is in normal mode, then all code may be executed - * normally. In the none mode, only bookkeeping code may be called. In - * particular, access method calls may not occur in this mode since the - * execution state is outside a transaction. - * - * The final two processing modes are used during special times. When the + * The first two processing modes are used during special times. When the * system state indicates bootstrap processing, transactions are all given - * transaction id "one" and are consequently guarenteed to commit. This mode + * transaction id "one" and are consequently guarenteed to commit. This mode * is used during the initial generation of template databases. * - * Finally, the execution state is in initialization mode until all normal - * initialization is complete. Some code behaves differently when executed in - * this mode to enable system bootstrapping. + * Initialization mode until all normal initialization is complete. + * Some code behaves differently when executed in this mode to enable + * system bootstrapping. + * + * If a POSTGRES binary is in normal mode, then all code may be executed + * normally. */ typedef enum ProcessingMode { - NoProcessing, /* "nothing" can be done */ BootstrapProcessing, /* bootstrap creation of template database */ InitProcessing, /* initializing system */ NormalProcessing /* normal processing */ diff --git a/src/include/storage/ipc.h b/src/include/storage/ipc.h index 8ae09e1990..a123448e2a 100644 --- a/src/include/storage/ipc.h +++ b/src/include/storage/ipc.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: ipc.h,v 1.35 1999/07/15 23:04:10 momjian Exp $ + * $Id: ipc.h,v 1.36 1999/10/06 21:58:17 vadim Exp $ * * NOTES * This file is very architecture-specific. This stuff should actually @@ -79,7 +79,7 @@ extern void on_exit_reset(void); extern IpcSemaphoreId IpcSemaphoreCreate(IpcSemaphoreKey semKey, int semNum, int permission, int semStartValue, - int removeOnExit, int *status); + int removeOnExit); extern void IpcSemaphoreKill(IpcSemaphoreKey key); extern void IpcSemaphoreLock(IpcSemaphoreId semId, int sem, int lock); extern void IpcSemaphoreUnlock(IpcSemaphoreId semId, int sem, int lock); @@ -105,6 +105,8 @@ typedef enum _LockId_ BUFMGRLOCKID, LOCKLOCKID, OIDGENLOCKID, + XIDGENLOCKID, + CNTLFILELOCKID, SHMEMLOCKID, SHMEMINDEXLOCKID, LOCKMGRLOCKID, @@ -147,6 +149,8 @@ typedef enum _LockId_ PROCSTRUCTLOCKID, OIDGENLOCKID, + XIDGENLOCKID, + CNTLFILELOCKID, FIRSTFREELOCKID } _LockId_; diff --git a/src/include/storage/spin.h b/src/include/storage/spin.h index be976c16b2..858f6e791f 100644 --- a/src/include/storage/spin.h +++ b/src/include/storage/spin.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: spin.h,v 1.9 1999/07/15 23:04:16 momjian Exp $ + * $Id: spin.h,v 1.10 1999/10/06 21:58:17 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -27,8 +27,8 @@ typedef int SPINLOCK; -extern bool CreateSpinlocks(IPCKey key); -extern bool InitSpinLocks(int init, IPCKey key); +extern void CreateSpinlocks(IPCKey key); +extern void InitSpinLocks(void); extern void SpinAcquire(SPINLOCK lockid); extern void SpinRelease(SPINLOCK lockid); diff --git a/src/include/tcop/tcopprot.h b/src/include/tcop/tcopprot.h index d0351a5f95..65bad2234e 100644 --- a/src/include/tcop/tcopprot.h +++ b/src/include/tcop/tcopprot.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: tcopprot.h,v 1.21 1999/05/26 12:56:58 momjian Exp $ + * $Id: tcopprot.h,v 1.22 1999/10/06 21:58:18 vadim Exp $ * * OLD COMMENTS * This file was created so that other c files could get the two @@ -38,6 +38,7 @@ #endif extern DLLIMPORT sigjmp_buf Warn_restart; extern bool InError; +extern bool ExitAfterAbort; #ifndef BOOTSTRAP_INCLUDE extern List *pg_parse_and_plan(char *query_string, Oid *typev, int nargs, |
