aboutsummaryrefslogtreecommitdiff
path: root/src/include/storage/latch.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/storage/latch.h')
-rw-r--r--src/include/storage/latch.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/include/storage/latch.h b/src/include/storage/latch.h
index 03ec07119b9..df891e68aab 100644
--- a/src/include/storage/latch.h
+++ b/src/include/storage/latch.h
@@ -31,6 +31,13 @@ typedef struct
#endif
} Latch;
+/* Bitmasks for events that may wake-up WaitLatch() clients */
+#define WL_LATCH_SET (1 << 0)
+#define WL_SOCKET_READABLE (1 << 1)
+#define WL_SOCKET_WRITEABLE (1 << 2)
+#define WL_TIMEOUT (1 << 3)
+#define WL_POSTMASTER_DEATH (1 << 4)
+
/*
* prototypes for functions in latch.c
*/
@@ -38,9 +45,9 @@ extern void InitLatch(volatile Latch *latch);
extern void InitSharedLatch(volatile Latch *latch);
extern void OwnLatch(volatile Latch *latch);
extern void DisownLatch(volatile Latch *latch);
-extern bool WaitLatch(volatile Latch *latch, long timeout);
-extern int WaitLatchOrSocket(volatile Latch *latch, pgsocket sock,
- bool forRead, bool forWrite, long timeout);
+extern int WaitLatch(volatile Latch *latch, int wakeEvents, long timeout);
+extern int WaitLatchOrSocket(volatile Latch *latch, int wakeEvents,
+ pgsocket sock, long timeout);
extern void SetLatch(volatile Latch *latch);
extern void ResetLatch(volatile Latch *latch);