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

Jeetu Golani jeetu.golani at gmail.com
Sun Mar 30 21:06:34 PDT 2008


Hey Bart,

> The
> policy you'd need to implement are is fairly simple and well
> documented.
>

Do you mean the X meets Z paper as the policy that should be implemented? or 
is there other documentation? I don't know the Z structure and if there's 
other documentation that would be great.

> 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?

Any simpl enough code with which I could test pthreads-win32 and win32 which 
would answer your question above? Maybe the code you used to measure on UNIX 
platforms??

You're right I was thinking of implementing a straight off port to begin with 
in the belief that the pthreads library would take care of the threading 
issues. 

However while I'm at it I'd like to at least study what would be truly good 
for the library.....if there's a mechanism that would help the rest and 
probably prevent the caveats you mentioned in the Win32 port then I'd like to 
see if I can implement it. While I'm tempted to try the simpler way first 
would love to understand if that is indeed better in the long run.

Bye for now


On Monday 31 Mar 2008, Barton C Massey wrote:
> 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