127#define WL_LATCH_SET (1 << 0)
128#define WL_SOCKET_READABLE (1 << 1)
129#define WL_SOCKET_WRITEABLE (1 << 2)
130#define WL_TIMEOUT (1 << 3)
131#define WL_POSTMASTER_DEATH (1 << 4)
132#define WL_EXIT_ON_PM_DEATH (1 << 5)
134#define WL_SOCKET_CONNECTED (1 << 6)
137#define WL_SOCKET_CONNECTED WL_SOCKET_WRITEABLE
139#define WL_SOCKET_CLOSED (1 << 7)
141#define WL_SOCKET_ACCEPT (1 << 8)
144#define WL_SOCKET_ACCEPT WL_SOCKET_READABLE
146#define WL_SOCKET_MASK (WL_SOCKET_READABLE | \
147 WL_SOCKET_WRITEABLE | \
148 WL_SOCKET_CONNECTED | \
void InitializeLatchWaitSet(void)
int WaitLatchOrSocket(Latch *latch, int wakeEvents, pgsocket sock, long timeout, uint32 wait_event_info)
void OwnLatch(Latch *latch)
void DisownLatch(Latch *latch)
void FreeWaitEventSetAfterFork(WaitEventSet *set)
int GetNumRegisteredWaitEvents(WaitEventSet *set)
void InitSharedLatch(Latch *latch)
void InitializeLatchSupport(void)
void ModifyWaitEvent(WaitEventSet *set, int pos, uint32 events, Latch *latch)
void SetLatch(Latch *latch)
void ShutdownLatchSupport(void)
bool WaitEventSetCanReportClosed(void)
void InitLatch(Latch *latch)
int AddWaitEventToSet(WaitEventSet *set, uint32 events, pgsocket fd, Latch *latch, void *user_data)
int WaitEventSetWait(WaitEventSet *set, long timeout, WaitEvent *occurred_events, int nevents, uint32 wait_event_info)
void FreeWaitEventSet(WaitEventSet *set)
WaitEventSet * CreateWaitEventSet(ResourceOwner resowner, int nevents)
void ResetLatch(Latch *latch)
int WaitLatch(Latch *latch, int wakeEvents, long timeout, uint32 wait_event_info)
struct WaitEvent WaitEvent
static int fd(const char *x, int i)
sig_atomic_t maybe_sleeping