diff options
author | Christian Linhart <chris@demorecorder.com> | 2015-04-29 09:11:37 +0200 |
---|---|---|
committer | Christian Linhart <chris@demorecorder.com> | 2015-04-08 11:55:48 +0200 |
commit | cb621341a62e6d2233db3e337611f6fdd4f675a6 (patch) | |
tree | f50f034344e974fa95fe72274290abb8a5b3bbfd /src/xcb.h | |
parent | c49aa985941112be05599032b9bb45b2652301ce (diff) |
expose 64-bit sequence numbers for XLib
While XCB uses 64-bit sequence number internally, it only exposes
"unsigned int" so that, on 32-bit architecture, Xlib based applications
may see their sequence number wrap which causes the connection to the X
server to be lost.
Expose 64-bit sequence number from XCB API so that Xlib and others can
use it even on 32-bit environment.
This implies the following API addition:
xcb_send_request64()
xcb_discard_reply64()
xcb_wait_for_reply64()
xcb_poll_for_reply64()
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71338
Reviewed-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Christian Linhart <chris@demorecorder.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Diffstat (limited to 'src/xcb.h')
-rw-r--r-- | src/xcb.h | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -378,6 +378,26 @@ xcb_generic_error_t *xcb_request_check(xcb_connection_t *c, xcb_void_cookie_t co */ void xcb_discard_reply(xcb_connection_t *c, unsigned int sequence); +/** + * @brief Discards the reply for a request, given by a 64bit sequence number + * @param c: The connection to the X server. + * @param sequence: 64-bit sequence number as returned by xcb_send_request64(). + * + * Discards the reply for a request. Additionally, any error generated + * by the request is also discarded (unless it was an _unchecked request + * and the error has already arrived). + * + * This function will not block even if the reply is not yet available. + * + * Note that the sequence really does have to come from xcb_send_request64(); + * the cookie sequence number is defined as "unsigned" int and therefore + * not 64-bit on all platforms. + * This function is not designed to operate on socket-handoff replies. + * + * Unlike its xcb_discard_reply() counterpart, the given sequence number is not + * automatically "widened" to 64-bit. + */ +void xcb_discard_reply64(xcb_connection_t *c, uint64_t sequence); /* xcb_ext.c */ |