[Xcb] [PATCH 1/2] Call _xcb_wake_up_next_reader from xcb_wait_for_special_event

Michel Dänzer michel at daenzer.net
Mon May 25 01:50:00 PDT 2015


From: Michel Dänzer <michel.daenzer at amd.com>

Fixes deadlock when waiting for a special event and concurrently
processing the display connection queue in another thread.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84252
Tested-by: Thomas Daede <bztdlinux at gmail.com>
Tested-by: Clément Guérin <geecko.dev at free.fr>
Signed-off-by: Michel Dänzer <michel at daenzer.net>
---
 src/xcb_in.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/xcb_in.c b/src/xcb_in.c
index 623a0a8..322bed8 100644
--- a/src/xcb_in.c
+++ b/src/xcb_in.c
@@ -761,6 +761,7 @@ xcb_generic_event_t *xcb_wait_for_special_event(xcb_connection_t *c,
         if(!_xcb_conn_wait(c, &se->special_event_cond, 0, 0))
             break;
 
+    _xcb_in_wake_up_next_reader(c);
     pthread_mutex_unlock(&c->iolock);
     return event;
 }
-- 
2.1.4



More information about the Xcb mailing list