aboutsummaryrefslogtreecommitdiff
path: root/libxcb/src/xcb_out.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-04-19 13:31:55 +0000
committermarha <marha@users.sourceforge.net>2010-04-19 13:31:55 +0000
commit0b44ee3fb92120190fa46e73b7abfbaa8a0adaec (patch)
tree19cbbfc194d8d543a7826cdb5cd6af966d15c619 /libxcb/src/xcb_out.c
parent0b53765917ae196147886189ca3514a07e0eb45e (diff)
downloadvcxsrv-0b44ee3fb92120190fa46e73b7abfbaa8a0adaec.tar.gz
vcxsrv-0b44ee3fb92120190fa46e73b7abfbaa8a0adaec.tar.bz2
vcxsrv-0b44ee3fb92120190fa46e73b7abfbaa8a0adaec.zip
svn merge -r539:HEAD "^/branches/released" .
Diffstat (limited to 'libxcb/src/xcb_out.c')
-rw-r--r--libxcb/src/xcb_out.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libxcb/src/xcb_out.c b/libxcb/src/xcb_out.c
index ab08d7da9..8347c37cd 100644
--- a/libxcb/src/xcb_out.c
+++ b/libxcb/src/xcb_out.c
@@ -53,7 +53,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)
@@ -284,7 +284,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;
}
@@ -332,13 +332,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;
}
@@ -349,12 +350,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);