Jamey Sharp
34168ab549
Remove the 'int *error' out-parameter for xcb_poll_for_event.
2006-10-06 16:35:36 -07:00
Jamey Sharp
57b0cd8fea
Factor out pthread_mutex_lock and unlock calls for the iolock.
2006-10-04 14:52:49 -07:00
Josh Triplett
9691890529
More fixups for incorrect API conversions by api_conv.pl
2006-09-23 14:17:52 -07:00
Josh Triplett
4ff12a1a94
Fix some mis-conversions by api_conv.pl, and remove the now-unused Xmd types
2006-09-23 13:31:13 -07:00
Josh Triplett
a3bd6f4760
The Great XCB Renaming
...
Rename API to follow a new naming convention:
* XCB_CONSTANTS_UPPERCASE_WITH_UNDERSCORES
* xcb_functions_lowercase_with_underscores
* xcb_types_lowercase_with_underscores_and_suffix_t
* expand all abbreviations like "req", "rep", and "iter"
Word boundaries for the names in the protocol descriptions fall:
* Wherever the protocol descriptions already have an underscore
* Between a lowercase letter and a subsequent uppercase letter
* Before the last uppercase letter in a string of uppercase letters followed
by a lowercase letter (such as in LSBFirst between LSB and First)
* Before and after a string of digits (with exceptions for sized types like
xcb_char2b_t and xcb_glx_float32_t to match the stdint.h convention)
Also fix up some particular naming issues:
* Rename shape_op and shape_kind to drop the "shape_" prefix, since otherwise
these types end up as xcb_shape_shape_{op,kind}_t.
* Remove leading underscores from enums in the GLX protocol description,
previously needed to ensure a word separator, but now redundant.
This renaming breaks code written for the previous API naming convention. The
scripts in XCB's tools directory will convert code written for the old API to
use the new API; they work well enough that we used them to convert the
non-program-generated code in XCB, and when run on the old program-generated
code, they almost exactly reproduce the new program-generated code (modulo
whitespace and bugs in the old code generator).
Authors: Vincent Torri, Thomas Hunger, Josh Triplett
2006-09-23 12:22:22 -07:00
Jamey Sharp
2c8b5994b3
Shut down the connection in all "fatal" error cases.
2006-09-21 15:35:01 -07:00
Jamey Sharp
7f71bf9c0f
Make all public functions do nothing on an error connection.
2006-09-21 15:18:57 -07:00
Jamey Sharp
df7fb77d6e
Refactor XCBPollForEvent with a shorter critical section.
...
This simplifies the patch for bug #8208 later.
2006-09-21 15:05:01 -07:00
Jamey Sharp
3cc0ddf0e6
Fix bug #7261 : events do not signal the end of replies for that sequence number.
2006-09-18 14:49:22 -07:00
Jamey Sharp
a92716f1da
Finish removing deprecated functions. Fixes build failure (oops).
2006-09-13 12:15:23 -07:00
Josh Triplett
13896d8f65
Fix typo: s/request/sequence/
2006-07-30 15:09:03 -07:00
Josh Triplett
685d8c76c2
Add XCBRequestCheck function needed for Plan 7.
2006-07-30 14:42:55 -07:00
Keith Packard
db2504130b
Switch sequence comparisons to handle 32-bit sequence number wrap.
...
Create a macro, XCB_SEQUENCE_COMPARE, that accepts two sequence numbers and
a comparison operator and correctly handles 32-bit wrap around.
Rewrite all ordered sequence number comparisons to use this macro.
Also, caught one error where a sequence was stored in a signed int variable.
Push out a GetInputFocus request when the sequence number does wrap at 32
bits so that applications cannot see sequence 0 (as that is an error
indicator).
2006-07-01 00:16:07 -07:00
Jamey Sharp
771761ccaa
Minor performance improvement: do not call _xcb_in_expect_reply unless it is needed. It is not often needed.
2006-04-20 11:51:01 -07:00
Jamey Sharp
8953a14f2b
Add <sys/select.h> to xcb_in.c to fix bug #6122 .
2006-04-19 22:48:10 -07:00
Jamey Sharp
f090da98f3
Remove the last goto in XCB: XCBWaitForReply now permits multiple threads to force the same cookie.
2006-04-19 20:31:20 -07:00
Jamey Sharp
d5347485a5
Restructure XCBWaitForReply to eliminate two gotos.
2006-04-19 20:23:37 -07:00
Jamey Sharp
d5ab03b4b7
Fixed poll_for_reply, added comments, and refactored XCBWaitForReply to call poll_for_reply.
2006-04-19 20:15:15 -07:00
Jamey Sharp
7667adbc63
Add XCBPollForReply and deprecate XCBGetRequestRead and XCBGetQueuedRequestRead.
2006-04-19 16:49:32 -07:00
Eric Anholt
8275ac3a4a
Retry a select() if it returns with EINTR. Fixes IO errors in Xephyr, which is
...
often interrupted by timers.
2006-04-09 19:51:10 -07:00
Jamey Sharp
d69c403cba
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xcb
2006-03-12 13:36:33 -08:00
Jamey Sharp
fb61c94d68
Remove c->out.vec. Pass iovecs directly down the call tree. Add _xcb_out_flush_to, refactor other functions, make write_block static.
2006-03-12 12:40:34 -08:00
Jamey Sharp
83e652f566
Move c->out.vec refs out of _xcb_conn_wait up to _xcb_out_flush.
2006-03-09 00:02:42 -08:00
Ian Osgood
1261a4150c
Add symbols for error and reply response_types,
...
and use XCBKeymapNotify from xcb-proto.
2006-03-08 22:26:20 -08:00
Jamey Sharp
e5458e477d
Implement provably-correct sequence wrap handling. Add flag XCB_REQUEST_DISCARD_REPLY.
2006-03-05 00:20:50 -08:00
Jamey Sharp
29f9fe0fc8
API/ABI change: XCBSendRequest returns the sequence number instead of using an out-parameter. Now 0 is a special sequence number indicating failure.
2006-03-03 11:08:10 -08:00
Jamey Sharp
255c21b17f
Add 32-bit full_sequence fields to generic errors and events, so callers can always correlate events and errors with requests correctly.
2006-03-03 01:45:00 -08:00
Jamey Sharp
ed823bf651
Separate notion of request-completed from current-request, and mark requests completed more aggressively. Detects some usage errors that are otherwise undetectable.
2006-03-02 13:49:00 -08:00
Jamey Sharp
5e350126a7
Bugfix: how about *not* leaking all pending_replies when no reply matches, as often happens with Xlib?
2006-02-27 10:53:08 -08:00
Jamey Sharp
76ad79a7ad
Replace readers generic list with hand-written typesafe version.
2006-02-27 01:43:07 -08:00
Jamey Sharp
fa71b9b835
Rename struct XCBReplyData to reader_list to follow my naming conventions and better reflect its purpose.
2006-02-27 01:06:15 -08:00
Jamey Sharp
ff665b5726
In struct XCBReplyData, change void *data to pthread_cond_t *data. That was dumb.
2006-02-27 00:54:59 -08:00
Jamey Sharp
86ce18c22c
Replace current_reply generic queue with hand-written version. No generic queues remain so delete their implementation.
2006-02-26 22:58:17 -08:00
Jamey Sharp
0f130b4d94
Replace events generic queue with hand-written typesafe version.
2006-02-26 18:28:50 -08:00
Jamey Sharp
ff7b6c9124
API/ABI break: Add flags to XCBSendRequest, first for error-checked requests.
...
There's no more race condition between event and reply handling.
The *RequestBlind and *RequestChecked functions are not yet implemented.
2006-02-26 15:45:08 -08:00
Jamey Sharp
7875040fa1
Replace pending_replies generic queue with a hand-implemented typesafe version.
2006-02-26 02:00:03 -08:00
Jamey Sharp
46a7549981
XCB has not had tracing features for a long time: remove the remnants.
2006-02-25 23:27:47 -08:00
Jamey Sharp
67b2649dc4
Move _xcb_read_block to xcb_in.c and make it static. Change calls in xcb_conn.c to _xcb_in_read_block instead.
2006-02-24 01:40:45 -08:00
Jamey Sharp
e1c2777aba
Coalesce readn into _xcb_in_read and simplify.
2006-02-24 00:59:08 -08:00
Jamey Sharp
3f8d0bd532
Move _xcb_readn to xcb_in.c and make it static. Minor change to _xcb_read_block to not depend on _xcb_readn.
2006-02-24 00:48:18 -08:00
Jamey Sharp
6149c7a6b5
More return value changes, and make _xcb_in_read_packet static since it is not called from outside xcb_in.c.
2006-02-23 12:15:09 -08:00
Jamey Sharp
5b1d39e27b
More return value changes.
2006-02-23 11:50:12 -08:00
Jamey Sharp
662479760c
Make the return value of _xcb_conn_wait boolean, instead of syscall-like.
2006-02-23 10:17:40 -08:00
Jamey Sharp
5b7182c659
Workaround X server bug, fd.o #3210 : if a GLXGetFBConfigs request is sent, fix the length field in the reply.
2006-02-18 18:12:40 -08:00
Josh Triplett
47ceed7861
Remove xcl and CVSROOT.
2006-02-18 16:49:41 -08:00