|
PostgreSQL Source Code git master
|
#include "utils/resowner.h"

Go to the source code of this file.
Data Structures | |
| struct | WaitEvent |
Macros | |
| #define | WL_LATCH_SET (1 << 0) |
| #define | WL_SOCKET_READABLE (1 << 1) |
| #define | WL_SOCKET_WRITEABLE (1 << 2) |
| #define | WL_TIMEOUT (1 << 3) /* not for WaitEventSetWait() */ |
| #define | WL_POSTMASTER_DEATH (1 << 4) |
| #define | WL_EXIT_ON_PM_DEATH (1 << 5) |
| #define | WL_SOCKET_CONNECTED WL_SOCKET_WRITEABLE |
| #define | WL_SOCKET_CLOSED (1 << 7) |
| #define | WL_SOCKET_ACCEPT WL_SOCKET_READABLE |
| #define | WL_SOCKET_MASK |
Typedefs | |
| typedef struct WaitEvent | WaitEvent |
| typedef struct WaitEventSet | WaitEventSet |
Functions | |
| void | InitializeWaitEventSupport (void) |
| WaitEventSet * | CreateWaitEventSet (ResourceOwner resowner, int nevents) |
| void | FreeWaitEventSet (WaitEventSet *set) |
| void | FreeWaitEventSetAfterFork (WaitEventSet *set) |
| int | AddWaitEventToSet (WaitEventSet *set, uint32 events, pgsocket fd, struct Latch *latch, void *user_data) |
| void | ModifyWaitEvent (WaitEventSet *set, int pos, uint32 events, struct Latch *latch) |
| int | WaitEventSetWait (WaitEventSet *set, long timeout, WaitEvent *occurred_events, int nevents, uint32 wait_event_info) |
| int | GetNumRegisteredWaitEvents (WaitEventSet *set) |
| bool | WaitEventSetCanReportClosed (void) |
| void | WakeupMyProc (void) |
| void | WakeupOtherProc (int pid) |
| #define WL_EXIT_ON_PM_DEATH (1 << 5) |
Definition at line 39 of file waiteventset.h.
| #define WL_LATCH_SET (1 << 0) |
Definition at line 34 of file waiteventset.h.
| #define WL_POSTMASTER_DEATH (1 << 4) |
Definition at line 38 of file waiteventset.h.
| #define WL_SOCKET_ACCEPT WL_SOCKET_READABLE |
Definition at line 51 of file waiteventset.h.
| #define WL_SOCKET_CLOSED (1 << 7) |
Definition at line 46 of file waiteventset.h.
| #define WL_SOCKET_CONNECTED WL_SOCKET_WRITEABLE |
Definition at line 44 of file waiteventset.h.
| #define WL_SOCKET_MASK |
Definition at line 53 of file waiteventset.h.
| #define WL_SOCKET_READABLE (1 << 1) |
Definition at line 35 of file waiteventset.h.
| #define WL_SOCKET_WRITEABLE (1 << 2) |
Definition at line 36 of file waiteventset.h.
| #define WL_TIMEOUT (1 << 3) /* not for WaitEventSetWait() */ |
Definition at line 37 of file waiteventset.h.
Definition at line 71 of file waiteventset.h.
|
extern |
Definition at line 569 of file waiteventset.c.
References Assert, elog, ERROR, WaitEventSet::events, WaitEventSet::exit_on_postmaster_death, fb(), fd(), WaitEventSet::latch, WaitEventSet::latch_pos, MyProcPid, WaitEventSet::nevents, WaitEventSet::nevents_space, Latch::owner_pid, PGINVALID_SOCKET, WaitEvent::pos, postmaster_alive_fds, POSTMASTER_FD_WATCH, selfpipe_readfd, WaitEventAdjustPoll(), WL_EXIT_ON_PM_DEATH, WL_LATCH_SET, WL_POSTMASTER_DEATH, and WL_SOCKET_MASK.
Referenced by ConfigurePostmasterWaitSet(), ExecAppendAsyncEventWait(), InitializeLatchWaitSet(), postgresForeignAsyncConfigureWait(), pq_init(), SysLoggerMain(), and WaitLatchOrSocket().
|
extern |
Definition at line 364 of file waiteventset.c.
References AcquireExternalFD(), close, data, elog, ERROR, WaitEventSet::events, WaitEventSet::exit_on_postmaster_death, fb(), WaitEventSet::latch, MAXALIGN, MemoryContextAllocZero(), WaitEventSet::nevents_space, WaitEventSet::owner, pgwin32_signal_event, WaitEventSet::pollfds, ReleaseExternalFD(), ResourceOwnerEnlarge(), ResourceOwnerRememberWaitEventSet(), and TopMemoryContext.
Referenced by ConfigurePostmasterWaitSet(), ExecAppendAsyncEventWait(), InitializeLatchWaitSet(), pq_init(), SysLoggerMain(), and WaitLatchOrSocket().
|
extern |
Definition at line 480 of file waiteventset.c.
References close, WaitEventSet::events, fb(), WaitEventSet::nevents, WaitEventSet::owner, pfree(), ReleaseExternalFD(), ResourceOwnerForgetWaitEventSet(), WL_LATCH_SET, and WL_POSTMASTER_DEATH.
Referenced by ConfigurePostmasterWaitSet(), ExecAppendAsyncEventWait(), ResOwnerReleaseWaitEventSet(), and WaitLatchOrSocket().
|
extern |
Definition at line 523 of file waiteventset.c.
References close, pfree(), and ReleaseExternalFD().
Referenced by ClosePostmasterPorts().
|
extern |
Definition at line 1884 of file waiteventset.c.
References WaitEventSet::nevents.
Referenced by ExecAppendAsyncEventWait(), and postgresForeignAsyncConfigureWait().
Definition at line 241 of file waiteventset.c.
References Assert, close, elog, FATAL, fb(), IsUnderPostmaster, latch_sigurg_handler(), MyProcPid, pqsignal, ReleaseExternalFD(), ReserveExternalFD(), selfpipe_owner_pid, selfpipe_readfd, selfpipe_writefd, and UnBlockSig.
Referenced by InitPostmasterChild(), InitStandaloneProcess(), and PostmasterMain().
Definition at line 655 of file waiteventset.c.
References Assert, elog, ERROR, WaitEventSet::events, WaitEvent::events, WaitEventSet::exit_on_postmaster_death, fb(), WaitEventSet::latch, MyProcPid, Latch::owner_pid, WaitEventAdjustPoll(), WL_EXIT_ON_PM_DEATH, WL_LATCH_SET, and WL_POSTMASTER_DEATH.
Referenced by pq_check_connection(), secure_read(), secure_write(), SwitchBackToLocalLatch(), SwitchToSharedLatch(), WaitLatch(), and WalSndWait().
Definition at line 1869 of file waiteventset.c.
Referenced by check_client_connection_check_interval().
|
extern |
Definition at line 1039 of file waiteventset.c.
References Assert, WaitEventSet::events, fb(), INSTR_TIME_GET_MILLISEC, INSTR_TIME_SET_CURRENT, INSTR_TIME_SET_ZERO, INSTR_TIME_SUBTRACT, Latch::is_set, WaitEventSet::latch, WaitEventSet::latch_pos, Latch::maybe_sleeping, pg_memory_barrier, PGINVALID_SOCKET, pgstat_report_wait_end(), pgstat_report_wait_start(), pgwin32_dispatch_queued_signals(), start_time, WaitEvent::user_data, WaitEventSetWaitBlock(), waiting, and WL_LATCH_SET.
Referenced by ExecAppendAsyncEventWait(), pq_check_connection(), secure_read(), secure_write(), ServerLoop(), SysLoggerMain(), WaitLatch(), WaitLatchOrSocket(), and WalSndWait().
Definition at line 2021 of file waiteventset.c.
References fb(), kill, MyProcPid, sendSelfPipeByte(), and waiting.
Referenced by SetLatch().
Definition at line 2034 of file waiteventset.c.
Referenced by SetLatch().