C interface to the X Window System protocol, which replaces the traditional Xlib interface.
Go to file
Keith Packard be0fe56c3b Ensure xcb owns socket and no other threads are writing before send_request
send_request may only write to out.queue if no other thread is busy
writing to the network (as that thread may be writing from out.queue).

send_request may only allocate request sequence numbers if XCB owns
the socket.

Therefore, send_request must make sure that both conditions are true
when it holds iolock, which can only be done by looping until both
conditions are true without having dropped the lock waiting for the
second condition.

We choose to get the socket back from Xlib first as get_socket_back
has a complicated test and checking for other threads writing is a
simple in-lined check.

This also changes the sequence number checks (64k requests with no
reply, 4M request wrapping) to ensure that both conditions are true
before queueing the request.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
2014-03-30 22:15:38 +02:00
doc autoconf: use default xorg configuration for doxygen documentation 2014-01-30 12:09:35 +09:00
m4 autoconf: use default xorg configuration for doxygen documentation 2014-01-30 12:09:35 +09:00
man man: build static man pages using xorg patterns 2014-01-30 12:10:00 +09:00
src Ensure xcb owns socket and no other threads are writing before send_request 2014-03-30 22:15:38 +02:00
tests tests: Add files to .gitignore 2013-08-15 00:35:08 +02:00
tools Match only XCB-namespaced XID generators when converting to xcb_generate_id. 2006-10-15 12:34:30 -07:00
.autom4te.cfg Use build-aux as autom4te cache directory 2013-08-15 00:35:07 +02:00
.gitignore Sort gitignore, adjust pattern for config.h 2013-08-15 00:35:08 +02:00
COPYING Fix the year in COPYING. 2006-04-27 17:32:20 -07:00
INSTALL Remove xcl and CVSROOT. 2006-02-18 16:49:41 -08:00
Makefile.am Validate .pc file Requires lines 2014-03-22 14:44:52 +01:00
NEWS Release libxcb 1.10 2013-12-22 15:59:24 +01:00
README Release libxcb 1.1 2007-11-04 17:29:13 -08:00
autogen.sh autogen.sh: Implement GNOME Build API 2013-01-16 13:20:49 -05:00
check-pc-requires Validate .pc file Requires lines 2014-03-22 14:44:52 +01:00
configure.ac man: build static man pages using xorg patterns 2014-01-30 12:10:00 +09:00
xcb-composite.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-damage.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-dpms.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-dri2.pc.in Add DRI2 support. (v2) 2009-10-19 09:47:06 -07:00
xcb-dri3.pc.in Add DRI3 library 2013-11-07 14:02:37 -08:00
xcb-glx.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-present.pc.in Update .pc file Requires lines to express full dependencies 2014-03-22 14:44:52 +01:00
xcb-randr.pc.in Update .pc file Requires lines to express full dependencies 2014-03-22 14:44:52 +01:00
xcb-record.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-render.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-res.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-screensaver.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-shape.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-shm.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-sync.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-xevie.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-xf86dri.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-xfixes.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-xinerama.pc.in Use substitition variables in xcb-xinerama.pc.in, not instances of their values 2006-11-25 22:27:33 -08:00
xcb-xinput.pc.in Update .pc file Requires lines to express full dependencies 2014-03-22 14:44:52 +01:00
xcb-xkb.pc.in small fix in the xkb pkg file 2010-08-16 18:22:42 +02:00
xcb-xprint.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-xselinux.pc.in Add SELinux extension support, disabled by default. 2008-01-24 16:02:34 -05:00
xcb-xtest.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-xv.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-xvmc.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb.pc.in Store xcbproto version libxcb was compiled with 2009-05-25 12:20:23 +02:00

About libxcb
============

libxcb provides an interface to the X Window System protocol, which
replaces the current Xlib interface. It has several advantages over
Xlib, including:
- size: small, simple library, and lower memory footprint
- latency hiding: batch several requests and wait for the replies later
- direct protocol access: interface and protocol correspond exactly
- proven thread support: transparently access XCB from multiple threads
- easy extension implementation: interfaces auto-generated from XML-XCB

Xlib can also use XCB as a transport layer, allowing software to make
requests and receive responses with both, which eases porting to XCB.
However, client programs, libraries, and toolkits will gain the most
benefit from a native XCB port.


Please report any issues you find to the freedesktop.org bug tracker,
at:

	<https://bugs.freedesktop.org/enter_bug.cgi?product=XCB>

Discussion about XCB occurs on the XCB mailing list:

        <mailto:xcb at lists.freedesktop.org>
        <http://lists.freedesktop.org/mailman/listinfo/xcb>

You can obtain the latest development versions of XCB using GIT.
For anonymous checkouts, use:

        git clone git://anongit.freedesktop.org/git/xcb/libxcb

For developers, use:

        git clone git+ssh://git.freedesktop.org/git/xcb/libxcb