diff options
author | Jamey Sharp <jamey@minilop.net> | 2005-04-10 18:24:57 +0000 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2005-04-10 18:24:57 +0000 |
commit | eaa0083fc962a122be9833f4970393929e9883a1 (patch) | |
tree | 11aee3608f7cbef73c43f4f63089f7662b42005d /xcb | |
parent | ea8f5d5ff2b37f5c281640d1a3c097141e331ed6 (diff) |
New public function XCBGetRequestRead: returns the last sequence number
that the server is known to have processed. This function enables apps
to determine whether forcing a cookie is going to block.
Diffstat (limited to 'xcb')
-rw-r--r-- | xcb/ChangeLog | 8 | ||||
-rw-r--r-- | xcb/src/xcb.h | 1 | ||||
-rw-r--r-- | xcb/src/xcb_in.c | 11 |
3 files changed, 20 insertions, 0 deletions
diff --git a/xcb/ChangeLog b/xcb/ChangeLog index 9f58f83..6e9cc4a 100644 --- a/xcb/ChangeLog +++ b/xcb/ChangeLog @@ -1,3 +1,11 @@ +2005-04-10 Jamey Sharp <jamey@minilop.net> + + * src/xcb.h, src/xcb_in.c: + New public function XCBGetRequestRead: returns the last sequence + number that the server is known to have processed. This function + enables apps to determine whether forcing a cookie is going to + block. + 2005-04-09 Jamey Sharp <jamey@minilop.net> * src/xcb_ext.c: diff --git a/xcb/src/xcb.h b/xcb/src/xcb.h index 844a5cf..b4d1a17 100644 --- a/xcb/src/xcb.h +++ b/xcb/src/xcb.h @@ -114,6 +114,7 @@ CARD32 XCBGetMaximumRequestLength(XCBConnection *c); XCBGenericEvent *XCBWaitEvent(XCBConnection *c); XCBGenericEvent *XCBPollForEvent(XCBConnection *c, int *error); +unsigned int XCBGetRequestRead(XCBConnection *c); /* xcb_ext.c */ diff --git a/xcb/src/xcb_in.c b/xcb/src/xcb_in.c index 52de962..2ca4ef2 100644 --- a/xcb/src/xcb_in.c +++ b/xcb/src/xcb_in.c @@ -168,6 +168,17 @@ XCBGenericEvent *XCBPollForEvent(XCBConnection *c, int *error) return ret; } +unsigned int XCBGetRequestRead(XCBConnection *c) +{ + unsigned int ret; + pthread_mutex_lock(&c->iolock); + /* FIXME: follow X meets Z architecture changes. */ + _xcb_in_read(c); + ret = c->in.request_read; + pthread_mutex_unlock(&c->iolock); + return ret; +} + /* Private interface */ int _xcb_in_init(_xcb_in *in) |