summaryrefslogtreecommitdiff
path: root/dix
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 /dix
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 'dix')
-rw-r--r--dix/dispatch.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 3b9600e27..a3c2fbb31 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -242,12 +242,14 @@ void Dispatch(void);
static struct xorg_list ready_clients;
static struct xorg_list saved_ready_clients;
+struct xorg_list output_pending_clients;
static void
init_client_ready(void)
{
xorg_list_init(&ready_clients);
xorg_list_init(&saved_ready_clients);
+ xorg_list_init(&output_pending_clients);
}
Bool
@@ -3411,6 +3413,7 @@ CloseDownClient(ClientPtr client)
UngrabServer(client);
}
mark_client_not_ready(client);
+ xorg_list_del(&client->output_pending);
BITCLEAR(grabWaiters, client->index);
DeleteClientFromAnySelections(client);
ReleaseActiveGrabs(client);
@@ -3501,6 +3504,7 @@ InitClient(ClientPtr client, int i, void *ospriv)
{
client->index = i;
xorg_list_init(&client->ready);
+ xorg_list_init(&client->output_pending);
client->clientAsMask = ((Mask) i) << CLIENTOFFSET;
client->closeDownMode = i ? DestroyAll : RetainPermanent;
client->requestVector = InitialVector;