[Xcb] [Socket handoff] Waiting forever...

Clemens Eisserer linuxhippy at gmail.com
Thu Jul 2 07:43:06 PDT 2009


Hi again,

One last question, hopefully this time really the last one. Sorry for
all the traffic.

I am a bit puzzled by the fact that xcb_poll_for_reply only accepts a
32-bit sequence number, whereas xcb seems to use 64-bit internally.
In  xcb_send_request, the 64-bit sequence counter is simply assigned
to a 32-bit return type:
unsigned int request = ++c->out.request;

How should I generate that 32-bit sequence number, to work arround
overflow problems?

> xcb_poll_for_reply, with the sequence number of
> the request you issued.
Great, exactly what I was looking for :)
I'll simply poll for outstanding replies when I flush.

> Aren't you writing 1000 requests here and telling XCB there were 500? I
> think that explains both your failures.
Ooops, embarrassing ;)
I already suspected something stupid, but not that stupid...

> I'm not sure there's much we can do about that. Of course, you'll get
> much better results if you convert all the event handling to use XCB
> directly instead of Xlib. :-) That's something several people on this
> list can help with, if you feel up for that.
Well, maybe later ;)

> BTW, it is true that the hand-coded protocol bits in your test app are
> frightening. :-) It doesn't matter much how one-off test programs are
> implemented, but I hope you'll use something more structured for your
> real code. :-)
Well, the code looks more or less like the sample code, in java there
are no lightweight structs like C has.
With the exception that I use a stack-like memory (putByte(), putShort(), ....).

I owe you a few beers ;)

Thanks for everything, Clemens


More information about the Xcb mailing list