diff --git a/dix/dixutils.c b/dix/dixutils.c index 331ccfb96..a11c82e9f 100644 --- a/dix/dixutils.c +++ b/dix/dixutils.c @@ -525,6 +525,10 @@ ProcessWorkQueue(void) { WorkQueuePtr q, *p; + // don't have a work queue yet + if (!workQueue) + return; + p = &workQueue; /* * Scan the work queue once, calling each function. Those diff --git a/doc/Xserver-spec.xml b/doc/Xserver-spec.xml index 15ecb0fd5..f33d90475 100644 --- a/doc/Xserver-spec.xml +++ b/doc/Xserver-spec.xml @@ -657,14 +657,11 @@ make the server suspend until one or more of the following occurs: Before WaitForSomething() computes the masks to pass to select, poll or similar operating system interface, it needs to -see if there is anything to do on the work queue; if so, it must call a DIX -routine called ProcessWorkQueue. +see if there is anything to do on the work queue; it must call a DIX +routine called ProcessWorkQueue().
- extern WorkQueuePtr workQueue; - - if (workQueue) - ProcessWorkQueue (); + ProcessWorkQueue ();
diff --git a/os/WaitFor.c b/os/WaitFor.c index ff1d376e9..1bb4ecc45 100644 --- a/os/WaitFor.c +++ b/os/WaitFor.c @@ -188,9 +188,7 @@ WaitForSomething(Bool are_ready) crashed connections and the screen saver timeout */ while (1) { /* deal with any blocked jobs */ - if (workQueue) { - ProcessWorkQueue(); - } + ProcessWorkQueue(); timeout = check_timers(); are_ready = clients_are_ready(); diff --git a/os/osdep.h b/os/osdep.h index 5b64f1a38..85fc7f9a1 100644 --- a/os/osdep.h +++ b/os/osdep.h @@ -123,8 +123,6 @@ listen_to_client(ClientPtr client); extern Bool NewOutputPending; -extern WorkQueuePtr workQueue; - /* in access.c */ extern Bool ComputeLocalClient(ClientPtr client);