aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/os/osdep.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2017-02-09 13:45:12 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-03-15 11:09:41 +0100
commit86110d6edadef2d9fbcd3ee0d008696bfcf7dcd4 (patch)
treea30179f8bc6aa3e68e648fba417bfb04603f3774 /nx-X11/programs/Xserver/os/osdep.h
parent289e8ce5652dda788dbed25346b3b43af70c371c (diff)
downloadnx-libs-86110d6edadef2d9fbcd3ee0d008696bfcf7dcd4.tar.gz
nx-libs-86110d6edadef2d9fbcd3ee0d008696bfcf7dcd4.tar.bz2
nx-libs-86110d6edadef2d9fbcd3ee0d008696bfcf7dcd4.zip
os: Add NotifyFd interfaces
Backported from X.org: commit 0c41b7af4ab0c8d22b88f201293f59524d1e7317 Author: Keith Packard <keithp@keithp.com> Date: Wed Nov 11 22:02:02 2015 -0800 os: Add NotifyFd interfaces This provides a callback-based interface to monitor file descriptors beyond the usual client and device interfaces. Modules within the server using file descriptors for reading and/or writing can call Bool SetNotifyFd(int fd, NotifyFdProcPtr notify_fd, int mask, void *data); mask can be any combination of X_NOTIFY_READ and X_NOTIFY_WRITE. When 'fd' becomes readable or writable, the notify_fd function will be called with the 'fd', the ready conditions and 'data' values as arguments, When the module no longer needs to monitor the fd, it will call void RemoveNotifyFd(int fd); RemoveNotifyFd may be called from the notify function. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Diffstat (limited to 'nx-X11/programs/Xserver/os/osdep.h')
-rw-r--r--nx-X11/programs/Xserver/os/osdep.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/os/osdep.h b/nx-X11/programs/Xserver/os/osdep.h
index f0e8b707b..dce44e612 100644
--- a/nx-X11/programs/Xserver/os/osdep.h
+++ b/nx-X11/programs/Xserver/os/osdep.h
@@ -188,6 +188,10 @@ extern void FreeOsBuffers(
OsCommPtr /*oc*/
);
+extern void InitNotifyFds(void);
+
+extern void HandleNotifyFds(void);
+
#include "dix.h"
extern ConnectionInputPtr AllocateInputBuffer(void);
@@ -199,6 +203,7 @@ extern fd_set AllClients;
extern fd_set LastSelectMask;
extern fd_set WellKnownConnections;
extern fd_set EnabledDevices;
+extern fd_set NotifyReadFds;
extern fd_set ClientsWithInput;
extern fd_set ClientsWriteBlocked;
extern fd_set OutputPending;