diff options
author | Jamey Sharp <jamey@minilop.net> | 2010-04-17 17:59:11 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2010-04-17 18:20:41 -0700 |
commit | b0525e242368fffbc77ebb45293f34e80847e65a (patch) | |
tree | 3665cf5324cb6a0b88a99d79da850ce4aa7220d3 /src/xcb_out.c | |
parent | eff3851ba80c42b5b3ba240f7e9049d7b0fac6f0 (diff) |
Always wake up readers after writing.
Since writers must make sure they read as well, threads may have gone to
sleep waiting for the opportunity to read. The writer must wake up one
of those readers or the application can hang.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Josh Triplett <josh@freedesktop.org>
Diffstat (limited to 'src/xcb_out.c')
-rw-r--r-- | src/xcb_out.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/xcb_out.c b/src/xcb_out.c index afc12c1..fbce7a0 100644 --- a/src/xcb_out.c +++ b/src/xcb_out.c @@ -338,6 +338,7 @@ int _xcb_out_send(xcb_connection_t *c, struct iovec *vector, int count) ret = _xcb_conn_wait(c, &c->out.cond, &vector, &count); c->out.request_written = c->out.request; pthread_cond_broadcast(&c->out.cond); + _xcb_in_wake_up_next_reader(c); return ret; } |