X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fxcb_out.c;h=5eb1e4280c7e09bd2f9bbdc8096102e93eb80c6e;hb=3a74b5e7a1aab0619b7e34d90d2b8b2b1e386129;hp=fe71193213d2ea8bc7494dcb08de5dfc82bfbf6b;hpb=ee1bc1d28a1bda0526db90139edc1304d2ef3d7c;p=free-sw%2Fxcb%2Flibxcb diff --git a/src/xcb_out.c b/src/xcb_out.c index fe71193..5eb1e42 100644 --- a/src/xcb_out.c +++ b/src/xcb_out.c @@ -343,6 +343,15 @@ int _xcb_out_send(xcb_connection_t *c, struct iovec *vector, int count) return ret; } +void _xcb_out_send_sync(xcb_connection_t *c) +{ + /* wait for other writing threads to get out of my way. */ + while(c->out.writing) + pthread_cond_wait(&c->out.cond, &c->iolock); + get_socket_back(c); + send_sync(c); +} + int _xcb_out_flush_to(xcb_connection_t *c, uint64_t request) { assert(XCB_SEQUENCE_COMPARE(request, <=, c->out.request));