diff options
author | marha <marha@users.sourceforge.net> | 2010-04-19 12:25:24 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-04-19 12:25:24 +0000 |
commit | a46e26df6103fb0e6e00d8d11d58c3f7a358208c (patch) | |
tree | c25cff1f3a02b71fa1b49c932b2986b4d01dfc36 /libxcb/src/xcb_out.c | |
parent | d76a22b9314bfd407c7e26f78305aeecb5d2bcfb (diff) | |
download | vcxsrv-a46e26df6103fb0e6e00d8d11d58c3f7a358208c.tar.gz vcxsrv-a46e26df6103fb0e6e00d8d11d58c3f7a358208c.tar.bz2 vcxsrv-a46e26df6103fb0e6e00d8d11d58c3f7a358208c.zip |
libxcb update 19/4/2010
Diffstat (limited to 'libxcb/src/xcb_out.c')
-rw-r--r-- | libxcb/src/xcb_out.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libxcb/src/xcb_out.c b/libxcb/src/xcb_out.c index b3050fe3d..fbce7a0ea 100644 --- a/libxcb/src/xcb_out.c +++ b/libxcb/src/xcb_out.c @@ -52,7 +52,7 @@ static int write_block(xcb_connection_t *c, struct iovec *vector, int count) vector[0].iov_base = c->out.queue; vector[0].iov_len = c->out.queue_len; c->out.queue_len = 0; - return _xcb_out_send(c, &vector, &count); + return _xcb_out_send(c, vector, count); } static void get_socket_back(xcb_connection_t *c) @@ -283,7 +283,7 @@ int xcb_writev(xcb_connection_t *c, struct iovec *vector, int count, uint64_t re return 0; pthread_mutex_lock(&c->iolock); c->out.request += requests; - ret = _xcb_out_send(c, &vector, &count); + ret = _xcb_out_send(c, vector, count); pthread_mutex_unlock(&c->iolock); return ret; } @@ -331,13 +331,14 @@ void _xcb_out_destroy(_xcb_out *out) pthread_mutex_destroy(&out->reqlenlock); } -int _xcb_out_send(xcb_connection_t *c, struct iovec **vector, int *count) +int _xcb_out_send(xcb_connection_t *c, struct iovec *vector, int count) { int ret = 1; - while(ret && *count) - ret = _xcb_conn_wait(c, &c->out.cond, vector, count); + while(ret && 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; } @@ -348,12 +349,11 @@ int _xcb_out_flush_to(xcb_connection_t *c, uint64_t request) return 1; if(c->out.queue_len) { - struct iovec vec, *vec_ptr = &vec; - int count = 1; + struct iovec vec; vec.iov_base = c->out.queue; vec.iov_len = c->out.queue_len; c->out.queue_len = 0; - return _xcb_out_send(c, &vec_ptr, &count); + return _xcb_out_send(c, &vec, 1); } while(c->out.writing) pthread_cond_wait(&c->out.cond, &c->iolock); |