summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-05-29 15:06:36 -0700
committerAdam Jackson <ajax@redhat.com>2016-07-18 15:27:51 -0400
commit0d294462a5af08ada654c588fad921ed7a22749b (patch)
treef992ef2f33c3e15b3c918cb6aff561d5cb00a63b
parente6636b438322a9a2f2270ad9d60bf3dfc72be0b3 (diff)
os: Add X_NOTIFY_ERROR value
This provides a way to report errors on file descriptors that is better defined than "any bits which are not READ or WRITE". Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--include/os.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/os.h b/include/os.h
index 9a3d9a9a0..b0a068ed2 100644
--- a/include/os.h
+++ b/include/os.h
@@ -148,9 +148,10 @@ extern _X_EXPORT void CloseDownConnection(ClientPtr /*client */ );
typedef void (*NotifyFdProcPtr)(int fd, int ready, void *data);
-#define X_NOTIFY_NONE 0
-#define X_NOTIFY_READ 1
-#define X_NOTIFY_WRITE 2
+#define X_NOTIFY_NONE 0x0
+#define X_NOTIFY_READ 0x1
+#define X_NOTIFY_WRITE 0x2
+#define X_NOTIFY_ERROR 0x4 /* don't need to select for, always reported */
extern _X_EXPORT Bool SetNotifyFd(int fd, NotifyFdProcPtr notify_fd, int mask, void *data);