diff options
author | Jamey Sharp <jamey@minilop.net> | 2006-03-09 00:02:42 -0800 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2006-03-09 00:02:42 -0800 |
commit | 83e652f566671f96ffc53a3c0099a84a1606c695 (patch) | |
tree | e7943f5120876abdf58ecbc2c117417a35fc1c5c /src/xcb_conn.c | |
parent | 621f891c49cbf4beba1e20fb9b6fb1be576d42f3 (diff) |
Move c->out.vec refs out of _xcb_conn_wait up to _xcb_out_flush.
Diffstat (limited to 'src/xcb_conn.c')
-rw-r--r-- | src/xcb_conn.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/xcb_conn.c b/src/xcb_conn.c index 0491721..792dfb8 100644 --- a/src/xcb_conn.c +++ b/src/xcb_conn.c @@ -198,13 +198,13 @@ void XCBDisconnect(XCBConnection *c) /* Private interface */ -int _xcb_conn_wait(XCBConnection *c, const int should_write, pthread_cond_t *cond) +int _xcb_conn_wait(XCBConnection *c, pthread_cond_t *cond, struct iovec **vector, int *count) { int ret; fd_set rfds, wfds; /* If the thing I should be doing is already being done, wait for it. */ - if(should_write ? c->out.writing : c->in.reading) + if(count ? c->out.writing : c->in.reading) { pthread_cond_wait(cond, &c->iolock); return 1; @@ -215,7 +215,7 @@ int _xcb_conn_wait(XCBConnection *c, const int should_write, pthread_cond_t *con ++c->in.reading; FD_ZERO(&wfds); - if(should_write) + if(count) { FD_SET(c->fd, &wfds); ++c->out.writing; @@ -231,10 +231,10 @@ int _xcb_conn_wait(XCBConnection *c, const int should_write, pthread_cond_t *con ret = ret && _xcb_in_read(c); if(FD_ISSET(c->fd, &wfds)) - ret = ret && _xcb_out_write(c, &c->out.vec, &c->out.vec_len); + ret = ret && _xcb_out_write(c, vector, count); } - if(should_write) + if(count) --c->out.writing; --c->in.reading; |