xcb_send_request: Send all requests using a common internal send_request.
authorJamey Sharp <jamey@minilop.net>
Sat, 9 Oct 2010 11:08:18 +0000 (04:08 -0700)
committerJamey Sharp <jamey@minilop.net>
Sat, 9 Oct 2010 19:37:23 +0000 (12:37 -0700)
This simplifies the critical section of xcb_send_request and fixes a
couple of subtle bugs:

- It's possible for xcb_send_request to need to issue two sync requests
  before it can issue the real request. Previously, we counted sequence
  numbers as if both were issued, but only one went out on the wire.

- The test for whether to sync at 32-bit sequence number wrap has been
  incorrect since we switched to 64-bit sequence numbers internally.

This change means that if the output queue was already full and the
current request is bigger than the output queue, XCB will do one more
write syscall than it did before. But syncs are rare and small requests
are the norm, so this shouldn't be a measurable difference.

Signed-off-by: Jamey Sharp <jamey@minilop.net>

No differences found