diff options
author | Jamey Sharp <jamey@minilop.net> | 2006-10-04 12:23:45 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2006-10-04 14:52:49 -0700 |
commit | 57b0cd8fea498a32ff2322583c7278d5e86aa4e8 (patch) | |
tree | b6dc61ff7ecf3925a2d314ca0e91a23383ca818a /src/xcb_out.c | |
parent | e7f473afbd02c87cc6b1fc9c7c240d6c5cc26763 (diff) |
Factor out pthread_mutex_lock and unlock calls for the iolock.
Diffstat (limited to 'src/xcb_out.c')
-rw-r--r-- | src/xcb_out.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xcb_out.c b/src/xcb_out.c index 162abd4..74787e3 100644 --- a/src/xcb_out.c +++ b/src/xcb_out.c @@ -163,7 +163,7 @@ unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vect workaround = WORKAROUND_GLX_GET_FB_CONFIGS_BUG; /* get a sequence number and arrange for delivery. */ - pthread_mutex_lock(&c->iolock); + _xcb_lock_io(c); /* wait for other writing threads to get out of my way. */ while(c->out.writing) pthread_cond_wait(&c->out.cond, &c->iolock); @@ -207,7 +207,7 @@ unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vect _xcb_conn_shutdown(c); request = 0; } - pthread_mutex_unlock(&c->iolock); + _xcb_unlock_io(c); return request; } @@ -216,9 +216,9 @@ int xcb_flush(xcb_connection_t *c) int ret; if(c->has_error) return 0; - pthread_mutex_lock(&c->iolock); + _xcb_lock_io(c); ret = _xcb_out_flush_to(c, c->out.request); - pthread_mutex_unlock(&c->iolock); + _xcb_unlock_io(c); return ret; } |