[Xcb] XCB I/O mechanism - Native win32 port

Barton C Massey bart at cs.pdx.edu
Sun Mar 30 12:51:44 PDT 2008


In message <200803301530.35802.jeetu.golani at gmail.com> you wrote:
> Is the threading mechanism what's chiefly bothering you?
> Would using the win32 port of the pthreads library solve
> that??

It's the synchronization stuff.

For example, last I looked, we depend pretty heavily on some
"standard" but unstandardized relationships between select()
and pthreads.  The question as to which thread (or threads)
wakes up when they are all blocked on a select() is
important to our code, and as far as I know POSIX is silent
on it. We measured several UNIX platforms and they all do
the same thing, but does Windows?

> However, if inspite of using win32 pthreads, threading
> behaves differently or there are other UNIX mechanisms in
> place here then yes I agree it'll probably be better to
> just take it all off and rewrite for win32 - that however
> seems quite a huge endeavour - would need a very very
> thorough understanding of every place in the code that
> this change would effect (probably the whole code).

There's a pretty sharp divide between the XCB top and bottom
layers, and between pieces of the bottom layer.  I suspect
you'd end up writing about 1000 lines of new code.  The
policy you'd need to implement are is fairly simple and well
documented.

I don't know what's easiest.  Sounds like you want to try a
straight port first---seems sensible to me.

    Bart


More information about the Xcb mailing list