aboutsummaryrefslogtreecommitdiff
path: root/libxcb/src/xcb_out.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-11-08 11:09:17 +0100
committermarha <marha@users.sourceforge.net>2013-11-08 11:09:17 +0100
commit401eb04e4dfb179291befb19d74e2e3148c4e268 (patch)
treebb9056b67a7bdf37cba96fecc69ce81b1809fb03 /libxcb/src/xcb_out.c
parentf7050e0ff2d1dd147ff5ef45f8ff7d8d7833db48 (diff)
downloadvcxsrv-401eb04e4dfb179291befb19d74e2e3148c4e268.tar.gz
vcxsrv-401eb04e4dfb179291befb19d74e2e3148c4e268.tar.bz2
vcxsrv-401eb04e4dfb179291befb19d74e2e3148c4e268.zip
libxtrans libxcb xcb-proto mesa git update 8 nov 2013
libxcb commit e8663a935890ff366f49e356211049dfd0d9756a libxcb/xcb-proto commit 29beba6bf02bda86a5b163ace63e1d0a4d3eee5b libxtrans commit 0153d1670e4a1883e1bb6dd971435d6268eac5ba mesa commit 035cce83f7b3d9a037c9e7cc17a212d6cf7e927f
Diffstat (limited to 'libxcb/src/xcb_out.c')
-rw-r--r--libxcb/src/xcb_out.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libxcb/src/xcb_out.c b/libxcb/src/xcb_out.c
index 429fa99d3..1a3aca515 100644
--- a/libxcb/src/xcb_out.c
+++ b/libxcb/src/xcb_out.c
@@ -263,6 +263,24 @@ unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vect
return request;
}
+void
+xcb_send_fd(xcb_connection_t *c, int fd)
+{
+#if HAVE_SENDMSG
+ if (c->has_error)
+ return;
+ pthread_mutex_lock(&c->iolock);
+ while (c->out.out_fd.nfd == XCB_MAX_PASS_FD) {
+ _xcb_out_flush_to(c, c->out.request);
+ if (c->has_error)
+ break;
+ }
+ if (!c->has_error)
+ c->out.out_fd.fd[c->out.out_fd.nfd++] = fd;
+ pthread_mutex_unlock(&c->iolock);
+#endif
+}
+
int xcb_take_socket(xcb_connection_t *c, void (*return_socket)(void *closure), void *closure, int flags, uint64_t *sent)
{
int ret;