cvs commit: src/lib/libpthread/thread thr_create.c thr_private.h
thr_sig.c thr_sigsuspend.c
David Xu
davidxu at FreeBSD.org
Sat Jun 12 07:40:04 GMT 2004
davidxu 2004-06-12 07:40:01 UTC
FreeBSD src repository
Modified files:
lib/libpthread/thread thr_create.c thr_private.h thr_sig.c
thr_sigsuspend.c
Log:
Check pending signals, if there is signal will be unblocked by
sigsuspend, thread shouldn't wait, in old code, it may be
ignored.
When a signal handler is invoked in sigsuspend, thread gets
two different signal masks, one is in thread structure,
sigprocmask() can retrieve it, another is in ucontext
which is a third parameter of signal handler, the former is
the result of sigsuspend mask ORed with sigaction's sa_mask
and current signal, the later is the mask in thread structure
before sigsuspend is called. After signal handler is called,
the mask in ucontext should be copied into thread structure,
and becomes CURRENT signal mask, then sigsuspend returns to
user code.
Reviewed by: deischen
Tested by: Sean McNeil <sean at mcneil.com>
Revision Changes Path
1.54 +1 -0 src/lib/libpthread/thread/thr_create.c
1.114 +1 -0 src/lib/libpthread/thread/thr_private.h
1.78 +5 -1 src/lib/libpthread/thread/thr_sig.c
1.24 +18 -21 src/lib/libpthread/thread/thr_sigsuspend.c
More information about the cvs-src
mailing list