[Xcb] [PATCH v2 2/2] Also signal special event waiters in _xcb_in_wake_up_next_reader

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


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

Fixes occasional deadlock when quitting the Mesa demo glthreads with
DRI3/Present.

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---

v2: Fix indentation of closing curly brace.

 src/xcb_in.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/xcb_in.c b/src/xcb_in.c
index 322bed8..9a8cae1 100644
--- a/src/xcb_in.c
+++ b/src/xcb_in.c
@@ -890,7 +890,14 @@ void _xcb_in_wake_up_next_reader(xcb_connection_t *c)
     if(c->in.readers)
         pthreadret = pthread_cond_signal(c->in.readers->data);
     else
+    {
+        xcb_special_event_t *se;
+
         pthreadret = pthread_cond_signal(&c->in.event_cond);
+        for (se = c->in.special_events; se; se = se->next) {
+             pthreadret = pthread_cond_signal(&se->special_event_cond);
+        }
+    }
     assert(pthreadret == 0);
 }
 
-- 
2.1.4



More information about the Xcb mailing list