author | ravi kumar <ravi.n.kumar@oracle.com> |
Wed, 12 Apr 2017 06:57:07 +0000 | |
changeset 1705 | 76aff95e6534 |
permissions | -rw-r--r-- |
1705
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
1 |
From 0ba6fe9b4eaa70383cd2ee066dfb3f1e67efeb83 Mon Sep 17 00:00:00 2001 |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
2 |
From: Christian Linhart <[email protected]> |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
3 |
Date: Wed, 29 Apr 2015 09:11:37 +0200 |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
4 |
Subject: expose 64-bit sequence numbers for XLib |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
5 |
|
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
6 |
While XCB uses 64-bit sequence number internally, it only exposes |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
7 |
"unsigned int" so that, on 32-bit architecture, Xlib based applications |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
8 |
may see their sequence number wrap which causes the connection to the X |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
9 |
server to be lost. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
10 |
|
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
11 |
Expose 64-bit sequence number from XCB API so that Xlib and others can |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
12 |
use it even on 32-bit environment. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
13 |
|
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
14 |
This implies the following API addition: |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
15 |
|
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
16 |
xcb_send_request64() |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
17 |
xcb_discard_reply64() |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
18 |
xcb_wait_for_reply64() |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
19 |
xcb_poll_for_reply64() |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
20 |
|
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
21 |
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71338 |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
22 |
|
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
23 |
Reviewed-by: Uli Schlachter <[email protected]> |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
24 |
Signed-off-by: Christian Linhart <[email protected]> |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
25 |
Signed-off-by: Olivier Fourdan <[email protected]> |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
26 |
|
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
27 |
diff --git a/src/xcb.h b/src/xcb.h |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
28 |
index 23fe74e..86eb1bc 100644 |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
29 |
--- a/src/xcb.h |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
30 |
+++ b/src/xcb.h |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
31 |
@@ -378,6 +378,26 @@ xcb_generic_error_t *xcb_request_check(xcb_connection_t *c, xcb_void_cookie_t co |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
32 |
*/ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
33 |
void xcb_discard_reply(xcb_connection_t *c, unsigned int sequence); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
34 |
|
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
35 |
+/** |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
36 |
+ * @brief Discards the reply for a request, given by a 64bit sequence number |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
37 |
+ * @param c: The connection to the X server. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
38 |
+ * @param sequence: 64-bit sequence number as returned by xcb_send_request64(). |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
39 |
+ * |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
40 |
+ * Discards the reply for a request. Additionally, any error generated |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
41 |
+ * by the request is also discarded (unless it was an _unchecked request |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
42 |
+ * and the error has already arrived). |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
43 |
+ * |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
44 |
+ * This function will not block even if the reply is not yet available. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
45 |
+ * |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
46 |
+ * Note that the sequence really does have to come from xcb_send_request64(); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
47 |
+ * the cookie sequence number is defined as "unsigned" int and therefore |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
48 |
+ * not 64-bit on all platforms. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
49 |
+ * This function is not designed to operate on socket-handoff replies. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
50 |
+ * |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
51 |
+ * Unlike its xcb_discard_reply() counterpart, the given sequence number is not |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
52 |
+ * automatically "widened" to 64-bit. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
53 |
+ */ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
54 |
+void xcb_discard_reply64(xcb_connection_t *c, uint64_t sequence); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
55 |
|
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
56 |
/* xcb_ext.c */ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
57 |
|
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
58 |
diff --git a/src/xcb_in.c b/src/xcb_in.c |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
59 |
index ad870c1..623a0a8 100644 |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
60 |
--- a/src/xcb_in.c |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
61 |
+++ b/src/xcb_in.c |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
62 |
@@ -523,6 +523,20 @@ void *xcb_wait_for_reply(xcb_connection_t *c, unsigned int request, xcb_generic_ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
63 |
return ret; |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
64 |
} |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
65 |
|
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
66 |
+void *xcb_wait_for_reply64(xcb_connection_t *c, uint64_t request, xcb_generic_error_t **e) |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
67 |
+{ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
68 |
+ void *ret; |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
69 |
+ if(e) |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
70 |
+ *e = 0; |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
71 |
+ if(c->has_error) |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
72 |
+ return 0; |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
73 |
+ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
74 |
+ pthread_mutex_lock(&c->iolock); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
75 |
+ ret = wait_for_reply(c, request, e); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
76 |
+ pthread_mutex_unlock(&c->iolock); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
77 |
+ return ret; |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
78 |
+} |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
79 |
+ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
80 |
int *xcb_get_reply_fds(xcb_connection_t *c, void *reply, size_t reply_size) |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
81 |
{ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
82 |
return (int *) (&((char *) reply)[reply_size]); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
83 |
@@ -595,6 +609,20 @@ void xcb_discard_reply(xcb_connection_t *c, unsigned int sequence) |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
84 |
pthread_mutex_unlock(&c->iolock); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
85 |
} |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
86 |
|
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
87 |
+void xcb_discard_reply64(xcb_connection_t *c, uint64_t sequence) |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
88 |
+{ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
89 |
+ if(c->has_error) |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
90 |
+ return; |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
91 |
+ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
92 |
+ /* If an error occurred when issuing the request, fail immediately. */ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
93 |
+ if(!sequence) |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
94 |
+ return; |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
95 |
+ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
96 |
+ pthread_mutex_lock(&c->iolock); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
97 |
+ discard_reply(c, sequence); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
98 |
+ pthread_mutex_unlock(&c->iolock); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
99 |
+} |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
100 |
+ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
101 |
int xcb_poll_for_reply(xcb_connection_t *c, unsigned int request, void **reply, xcb_generic_error_t **error) |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
102 |
{ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
103 |
int ret; |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
104 |
@@ -612,6 +640,23 @@ int xcb_poll_for_reply(xcb_connection_t *c, unsigned int request, void **reply, |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
105 |
return ret; |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
106 |
} |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
107 |
|
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
108 |
+int xcb_poll_for_reply64(xcb_connection_t *c, uint64_t request, void **reply, xcb_generic_error_t **error) |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
109 |
+{ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
110 |
+ int ret; |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
111 |
+ if(c->has_error) |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
112 |
+ { |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
113 |
+ *reply = 0; |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
114 |
+ if(error) |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
115 |
+ *error = 0; |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
116 |
+ return 1; /* would not block */ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
117 |
+ } |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
118 |
+ assert(reply != 0); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
119 |
+ pthread_mutex_lock(&c->iolock); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
120 |
+ ret = poll_for_reply(c, request, reply, error); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
121 |
+ pthread_mutex_unlock(&c->iolock); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
122 |
+ return ret; |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
123 |
+} |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
124 |
+ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
125 |
xcb_generic_event_t *xcb_wait_for_event(xcb_connection_t *c) |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
126 |
{ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
127 |
xcb_generic_event_t *ret; |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
128 |
diff --git a/src/xcb_out.c b/src/xcb_out.c |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
129 |
index dc42954..8cc5be8 100644 |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
130 |
--- a/src/xcb_out.c |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
131 |
+++ b/src/xcb_out.c |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
132 |
@@ -177,7 +177,7 @@ uint32_t xcb_get_maximum_request_length(xcb_connection_t *c) |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
133 |
return c->out.maximum_request_length.value; |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
134 |
} |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
135 |
|
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
136 |
-unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *req) |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
137 |
+uint64_t xcb_send_request64(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *req) |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
138 |
{ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
139 |
uint64_t request; |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
140 |
uint32_t prefix[2]; |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
141 |
@@ -286,6 +286,12 @@ unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vect |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
142 |
return request; |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
143 |
} |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
144 |
|
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
145 |
+/* request number are actually uint64_t internally but keep API compat with unsigned int */ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
146 |
+unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *req) |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
147 |
+{ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
148 |
+ return xcb_send_request64(c, flags, vector, req); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
149 |
+} |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
150 |
+ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
151 |
void |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
152 |
xcb_send_fd(xcb_connection_t *c, int fd) |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
153 |
{ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
154 |
diff --git a/src/xcbext.h b/src/xcbext.h |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
155 |
index 7587513..b2575f7 100644 |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
156 |
--- a/src/xcbext.h |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
157 |
+++ b/src/xcbext.h |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
158 |
@@ -83,6 +83,30 @@ enum xcb_send_request_flags_t { |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
159 |
unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *request); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
160 |
|
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
161 |
/** |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
162 |
+ * @brief Send a request to the server, with 64-bit sequence number returned. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
163 |
+ * @param c: The connection to the X server. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
164 |
+ * @param flags: A combination of flags from the xcb_send_request_flags_t enumeration. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
165 |
+ * @param vector: Data to send; must have two iovecs before start for internal use. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
166 |
+ * @param request: Information about the request to be sent. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
167 |
+ * @return The request's sequence number on success, 0 otherwise. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
168 |
+ * |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
169 |
+ * This function sends a new request to the X server. The data of the request is |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
170 |
+ * given as an array of @c iovecs in the @p vector argument. The length of that |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
171 |
+ * array and the neccessary management information are given in the @p request |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
172 |
+ * argument. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
173 |
+ * |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
174 |
+ * When this function returns, the request might or might not be sent already. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
175 |
+ * Use xcb_flush() to make sure that it really was sent. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
176 |
+ * |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
177 |
+ * Please note that this function is not the prefered way for sending requests. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
178 |
+ * It's better to use the generated wrapper functions. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
179 |
+ * |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
180 |
+ * Please note that xcb might use index -1 and -2 of the @p vector array internally, |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
181 |
+ * so they must be valid! |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
182 |
+ */ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
183 |
+uint64_t xcb_send_request64(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *request); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
184 |
+ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
185 |
+/** |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
186 |
* @brief Send a file descriptor to the server in the next call to xcb_send_request. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
187 |
* @param c: The connection to the X server. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
188 |
* @param fd: The file descriptor to send. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
189 |
@@ -162,6 +186,21 @@ int xcb_writev(xcb_connection_t *c, struct iovec *vector, int count, uint64_t re |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
190 |
void *xcb_wait_for_reply(xcb_connection_t *c, unsigned int request, xcb_generic_error_t **e); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
191 |
|
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
192 |
/** |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
193 |
+ * @brief Wait for the reply of a given request, with 64-bit sequence number |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
194 |
+ * @param c: The connection to the X server. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
195 |
+ * @param request: 64-bit sequence number of the request as returned by xcb_send_request64(). |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
196 |
+ * @param e: Location to store errors in, or NULL. Ignored for unchecked requests. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
197 |
+ * |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
198 |
+ * Returns the reply to the given request or returns null in the event of |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
199 |
+ * errors. Blocks until the reply or error for the request arrives, or an I/O |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
200 |
+ * error occurs. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
201 |
+ * |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
202 |
+ * Unlike its xcb_wait_for_reply() counterpart, the given sequence number is not |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
203 |
+ * automatically "widened" to 64-bit. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
204 |
+ */ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
205 |
+void *xcb_wait_for_reply64(xcb_connection_t *c, uint64_t request, xcb_generic_error_t **e); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
206 |
+ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
207 |
+/** |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
208 |
* @brief Poll for the reply of a given request. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
209 |
* @param c: The connection to the X server. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
210 |
* @param request: Sequence number of the request as returned by xcb_send_request(). |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
211 |
@@ -174,6 +213,21 @@ void *xcb_wait_for_reply(xcb_connection_t *c, unsigned int request, xcb_generic_ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
212 |
int xcb_poll_for_reply(xcb_connection_t *c, unsigned int request, void **reply, xcb_generic_error_t **error); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
213 |
|
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
214 |
/** |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
215 |
+ * @brief Poll for the reply of a given request, with 64-bit sequence number. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
216 |
+ * @param c: The connection to the X server. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
217 |
+ * @param request: 64-bit sequence number of the request as returned by xcb_send_request(). |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
218 |
+ * @param reply: Location to store the reply in, must not be NULL. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
219 |
+ * @param e: Location to store errors in, or NULL. Ignored for unchecked requests. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
220 |
+ * @return 1 when the reply to the request was returned, else 0. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
221 |
+ * |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
222 |
+ * Checks if the reply to the given request already received. Does not block. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
223 |
+ * |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
224 |
+ * Unlike its xcb_poll_for_reply() counterpart, the given sequence number is not |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
225 |
+ * automatically "widened" to 64-bit. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
226 |
+ */ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
227 |
+int xcb_poll_for_reply64(xcb_connection_t *c, uint64_t request, void **reply, xcb_generic_error_t **error); |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
228 |
+ |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
229 |
+/** |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
230 |
* @brief Don't use this, only needed by the generated code. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
231 |
* @param c: The connection to the X server. |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
232 |
* @param reply: A reply that was received from the server |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
233 |
-- |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
234 |
cgit v0.10.2 |
76aff95e6534
19154747 X application crashed with Assertion failed: xcb_xlib_threads_sequence_lost
ravi kumar <ravi.n.kumar@oracle.com>
parents:
diff
changeset
|
235 |