NTPL & pthreads locks

Dan Kegel dank at kegel.com
Tue Apr 22 14:52:43 CDT 2003

Alexandre Julliard wrote:
> Peter Hunnisett <peter at transgaming.com> writes:
>>For instance pthread_sigmask should be used instead of sigprocmask and
>>wine should not be resetting signal handlers willy nilly as they're
>>shared across all threads. SIGNAL_Reset (or whatever it is) should not
>>tear down the signal handlers when 1 thread exits as they're still
>>used by other threads.
> We don't call SIGNAL_Reset for NPTL. And using pthread_sigmask
> shouldn't make any difference, sigprocmask is thread-local anyway (and
> it avoids a few #ifdefs...)

sigprocmask may be thread-local in NPTL, but it's not in SUSv3,
which doesn't at all specify what happens when
you call sigprocmask in a multithreaded program.  See
For portability's sake, one should probably use pthread_sigmask.
- Dan

Dan Kegel

More information about the wine-devel mailing list