[libdispatch-dev] [PATCH 00/17] portability + chainsaw

Kevin Van Vechten kvv at apple.com
Mon Oct 19 00:18:22 PDT 2009

On Oct 19, 2009, at 12:08 AM, Paolo Bonzini wrote:

> On 10/19/2009 04:52 AM, Mark Heily wrote:
>> The benefits of using a wrapper library to emulate kqueue/kevent is that
>> you don't have to make any major modifications to libdispatch. All you
>> need to do is add -lkqueue to LDFLAGS, add -I/usr/include/kqueue to
>> CFLAGS, and you're done. I sent a patch earlier to this effect.
> I agree with that.  libkqueue is a great short-term solution and probably good even in the long-term.  I have no crystal ball to say that; my doubts come from having tried to implement poll(2) and select(2) under Windows for a long time in a project of mine, and then realizing that it is basically impossible, but in this case we're talking of two Unices, so in general it is an easier task.
> Still, trying to use sys/event.h in as few places as possible is good anyway in my opinion; in fact, the ease with which I could do that shows that the separation was even almost there in the design already!  This is a nice testimony to the great design of libdispatch.
> I may try to implement the required signalfd semantics in the Linux kernel, or at least something related (e.g. a "block signal on all threads" system call).
> Paolo

I'd like to voice my agreement that I see value in both Paolo's work to segregate the kevent-specific logic and Mark's work to provide kevent wrappers where it is feasible to do so.  Thank you both for your great contributions so far!


More information about the libdispatch-dev mailing list