Date: Tue, 27 Oct 2009 10:42:24 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/compat/freebsd32 freebsd32_misc.c src/sys/kern kern_sig.c src/sys/sys signalvar.h syscallsubr.h Message-ID: <200910271043.n9RAh4iC077199@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
kib 2009-10-27 10:42:24 UTC FreeBSD src repository Modified files: sys/compat/freebsd32 freebsd32_misc.c sys/kern kern_sig.c sys/sys signalvar.h syscallsubr.h Log: SVN rev 198506 on 2009-10-27 10:42:24Z by kib In kern_sigsuspend(), better manipulate thread signal mask using kern_sigprocmask() to properly notify other possible candidate threads for signal delivery. Since sigsuspend() shall only return to usermode after a signal was delivered, do cursig/postsig loop immediately after waiting for signal, repeating the wait if wakeup was spurious due to race with other thread fetching signal from the process queue before us. Add thread_suspend_check() call to allow the thread to be stopped or killed while in loop. Modify last argument of kern_sigprocmask() from boolean to flags, allowing the function to be called with locked proc. Convertion of the callers that supplied 1 to the old argument will be done in the next commit, and due to SIGPROCMASK_OLD value equial to 1, code is formally correct in between. Reviewed by: davidxu Tested by: pho MFC after: 1 month Revision Changes Path 1.95 +1 -12 src/sys/compat/freebsd32/freebsd32_misc.c 1.378 +29 -22 src/sys/kern/kern_sig.c 1.81 +6 -1 src/sys/sys/signalvar.h 1.59 +0 -2 src/sys/sys/syscallsubr.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910271043.n9RAh4iC077199>