[PATCH xserver 14/25] dix: Intermediate GrabServer state 'GrabKickout' not needed

Keith Packard keithp at keithp.com
Wed May 25 05:38:51 UTC 2016


The intermediate grabState, "GrabKickout", was used to trigger
dispatch into going back to WaitForSomething after doing a GrabServer
so that the set of ready clients would be recomputed to match what the
server should be processing. As we only process one client per
WaitForSomething call, we will always hit WaitForSomething after
finishing the current client, and so don't need any special case here.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 dix/dispatch.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/dix/dispatch.c b/dix/dispatch.c
index cd1e335..76e392b 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -151,7 +151,6 @@ static ClientPtr grabClient;
 
 #define GrabNone 0
 #define GrabActive 1
-#define GrabKickout 2
 static int grabState = GrabNone;
 static long grabWaiters[mskcnt];
 CallbackListPtr ServerGrabCallback = NULL;
@@ -401,11 +400,6 @@ Dispatch(void)
         if (!dispatchException && clients_are_ready()) {
             client = SmartScheduleClient();
 
-            /* GrabServer activation can cause this to be true */
-            if (grabState == GrabKickout) {
-                grabState = GrabActive;
-                continue;
-            }
             isItTimeToYield = FALSE;
 
             start_tick = SmartScheduleTime;
@@ -1085,7 +1079,7 @@ ProcGrabServer(ClientPtr client)
     rc = OnlyListenToOneClient(client);
     if (rc != Success)
         return rc;
-    grabState = GrabKickout;
+    grabState = GrabActive;
     grabClient = client;
 
     if (ServerGrabCallback) {
-- 
2.8.0.rc3



More information about the xorg-devel mailing list