aboutsummaryrefslogtreecommitdiff
path: root/libxcb/src/xcb_out.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-11-08 13:12:15 +0100
committermarha <marha@users.sourceforge.net>2013-11-08 13:12:15 +0100
commitf707ea3ce065f0ce40f586c40283fab42059b485 (patch)
tree055a5ccdecaec105365d1de9a90d7d6b38f257fb /libxcb/src/xcb_out.c
parentc8483dc2831dc37d93a36804022f6b064f5962ea (diff)
parent09e94a8e392e8fe6fd89ddefbf3897a92e525b5b (diff)
downloadvcxsrv-f707ea3ce065f0ce40f586c40283fab42059b485.tar.gz
vcxsrv-f707ea3ce065f0ce40f586c40283fab42059b485.tar.bz2
vcxsrv-f707ea3ce065f0ce40f586c40283fab42059b485.zip
Merge remote-tracking branch 'origin/released'
* origin/released: Added presentproto-1.0 libxtrans libxcb xcb-proto mesa git update 8 nov 2013 Conflicts: X11/xtrans/Xtransint.h X11/xtrans/Xtranssock.c libxcb/src/.gitignore mesalib/src/mesa/drivers/dri/common/dri_util.c
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 4cb837c1a..3a1c3e59f 100644
--- a/libxcb/src/xcb_out.c
+++ b/libxcb/src/xcb_out.c
@@ -264,6 +264,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;