| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| #ifndef IPC_H |
| #define IPC_H |
|
|
| typedef void (*pg_on_exit_callback) (int code, Datum arg); |
| typedef void (*shmem_startup_hook_type) (void); |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| #define PG_ENSURE_ERROR_CLEANUP(cleanup_function, arg) \ |
| do { \ |
| before_shmem_exit(cleanup_function, arg); \ |
| PG_TRY() |
|
|
| #define PG_END_ENSURE_ERROR_CLEANUP(cleanup_function, arg) \ |
| cancel_before_shmem_exit(cleanup_function, arg); \ |
| PG_CATCH(); \ |
| { \ |
| cancel_before_shmem_exit(cleanup_function, arg); \ |
| cleanup_function (0, arg); \ |
| PG_RE_THROW(); \ |
| } \ |
| PG_END_TRY(); \ |
| } while (0) |
|
|
|
|
| |
| extern PGDLLIMPORT bool proc_exit_inprogress; |
| extern PGDLLIMPORT bool shmem_exit_inprogress; |
|
|
| extern void proc_exit(int code) pg_attribute_noreturn(); |
| extern void shmem_exit(int code); |
| extern void on_proc_exit(pg_on_exit_callback function, Datum arg); |
| extern void on_shmem_exit(pg_on_exit_callback function, Datum arg); |
| extern void before_shmem_exit(pg_on_exit_callback function, Datum arg); |
| extern void cancel_before_shmem_exit(pg_on_exit_callback function, Datum arg); |
| extern void on_exit_reset(void); |
| extern void check_on_shmem_exit_lists_are_empty(void); |
|
|
| |
| extern PGDLLIMPORT shmem_startup_hook_type shmem_startup_hook; |
|
|
| extern Size CalculateShmemSize(int *num_semaphores); |
| extern void CreateSharedMemoryAndSemaphores(void); |
| extern void InitializeShmemGUCs(void); |
|
|
| #endif |
|
|