Date: Sat, 12 Jun 2004 07:40:01 +0000 (UTC) From: David Xu <davidxu@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libpthread/thread thr_create.c thr_private.h thr_sig.c thr_sigsuspend.c Message-ID: <200406120740.i5C7e288099399@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406120740.i5C7e288099399>