From f85661c3bca97faa72431df92a3867be39a74e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Mon, 1 Jun 2015 11:04:18 +0900 Subject: Call _xcb_wake_up_next_reader from xcb_wait_for_special_event MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All functions calling _xcb_conn_wait() must make sure that waiting readers are woken up when we read a reply or event that they are waiting for. xcb_wait_for_special_event() did not do so. This adds the missing call to_xcb_in_wake_up_next_reader(). 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 Tested-by: Clément Guérin Reviewed-by: Uli Schlachter Signed-off-by: Michel Dänzer Signed-off-by: Uli Schlachter --- src/xcb_in.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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; } -- cgit v1.2.3