Re: Mixing Asynchronous Network I/O and POSIX Threads

2011-09-19 Thread John Baldwin
On Sunday, September 18, 2011 5:45:26 pm Richard Yao wrote: > Dear Jilles, > > I am using sigwaitinfo() with all interrupts masked to avoid the > possibility of race conditions in signal handlers, but I have not used > any realtime signals. Linux 2.6.35 found a way to invoke the SIGIO > handler de

Re: Mixing Asynchronous Network I/O and POSIX Threads

2011-09-18 Thread Adrian Chadd
Why not just port to using libevent 2.x with the thread support, and thus be portable to all platforms? Adrian ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "free

Re: Mixing Asynchronous Network I/O and POSIX Threads

2011-09-18 Thread Richard Yao
Dear Jilles, I am using sigwaitinfo() with all interrupts masked to avoid the possibility of race conditions in signal handlers, but I have not used any realtime signals. Linux 2.6.35 found a way to invoke the SIGIO handler despite it being masked, but that issue would not occur under production c

Re: Mixing Asynchronous Network I/O and POSIX Threads

2011-09-18 Thread Jilles Tjoelker
On Sun, Sep 18, 2011 at 11:32:08AM -0400, Richard Yao wrote: > I wrote a program for Linux that uses Asynchronous Network I/O and > POSIX Threads. It uses a mix of gettid(), fcntl() and F_SETOWN to > specify which thread handles each connection's SIGIO interrupts. > gettid() is Linux-specific and I

Re: Mixing Asynchronous Network I/O and POSIX Threads

2011-09-18 Thread Uffe Jakobsen
On 2011-09-18 17:32, Richard Yao wrote: Dear FreeBSD Community: I wrote a program for Linux that uses Asynchronous Network I/O and POSIX Threads. It uses a mix of gettid(), fcntl() and F_SETOWN to specify which thread handles each connection's SIGIO interrupts. gettid() is Linux-specific and I

Mixing Asynchronous Network I/O and POSIX Threads

2011-09-18 Thread Richard Yao
Dear FreeBSD Community: I wrote a program for Linux that uses Asynchronous Network I/O and POSIX Threads. It uses a mix of gettid(), fcntl() and F_SETOWN to specify which thread handles each connection's SIGIO interrupts. gettid() is Linux-specific and I would prefer to do this in a way that also