summaryrefslogtreecommitdiff
path: root/os/osdep.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-05-26 10:40:44 -0700
committerAdam Jackson <ajax@redhat.com>2016-07-21 15:04:47 -0400
commitf993091e7db81b0420e23c485378cba112278839 (patch)
tree1fa9dc096853f7a8c512f76e4d7f57c8a132e598 /os/osdep.h
parent8f1edf4bd3a1f050ce9eeb5eac45dd1a8f7a6d5e (diff)
os: Switch server to poll(2) [v3]
Eliminates all of the fd_set mangling in the server main thread v2: Listen for POLLOUT while writes are blocked. v3: Only mark client not ready on EAGAIN return from read Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'os/osdep.h')
-rw-r--r--os/osdep.h27
1 files changed, 9 insertions, 18 deletions
diff --git a/os/osdep.h b/os/osdep.h
index 9dbf0fb89..df0abebb0 100644
--- a/os/osdep.h
+++ b/os/osdep.h
@@ -162,8 +162,12 @@ typedef struct _osComm {
XID auth_id; /* authorization id */
CARD32 conn_time; /* timestamp if not established, else 0 */
struct _XtransConnInfo *trans_conn; /* transport connection object */
+ int flags;
} OsCommRec, *OsCommPtr;
+#define OS_COMM_GRAB_IMPERVIOUS 1
+#define OS_COMM_IGNORED 2
+
extern int FlushClient(ClientPtr /*who */ ,
OsCommPtr /*oc */ ,
const void * /*extraBuf */ ,
@@ -173,24 +177,13 @@ extern int FlushClient(ClientPtr /*who */ ,
extern void FreeOsBuffers(OsCommPtr /*oc */
);
-extern void InitNotifyFds(void);
-
-extern void HandleNotifyFds(void);
-
#include "dix.h"
+#include "ospoll.h"
+
+extern struct ospoll *server_poll;
-extern fd_set AllSockets;
-extern fd_set AllClients;
-extern fd_set LastSelectMask;
-extern fd_set LastSelectWriteMask;
-extern fd_set WellKnownConnections;
-extern fd_set EnabledDevices;
-extern fd_set NotifyReadFds;
-extern fd_set NotifyWriteFds;
-extern fd_set ClientsWithInput;
-extern fd_set ClientsWriteBlocked;
-extern fd_set OutputPending;
-extern fd_set IgnoredClientsWithInput;
+Bool
+listen_to_client(ClientPtr client);
#if !defined(WIN32) || defined(__CYGWIN__)
extern int *ConnectionTranslation;
@@ -201,8 +194,6 @@ extern void ClearConnectionTranslation(void);
#endif
extern Bool NewOutputPending;
-extern Bool AnyWritesPending;
-extern Bool NumNotifyWriteFd;
extern WorkQueuePtr workQueue;