From owner-cvs-src-old@FreeBSD.ORG Tue Oct 27 10:43:04 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CAD910656A4 for ; Tue, 27 Oct 2009 10:43:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7FA478FC1E for ; Tue, 27 Oct 2009 10:43:04 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n9RAh49U077200 for ; Tue, 27 Oct 2009 10:43:04 GMT (envelope-from kib@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n9RAh4iC077199 for cvs-src-old@freebsd.org; Tue, 27 Oct 2009 10:43:04 GMT (envelope-from kib@repoman.freebsd.org) Message-Id: <200910271043.n9RAh4iC077199@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to kib@repoman.freebsd.org using -f From: Konstantin Belousov Date: Tue, 27 Oct 2009 10:42:24 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/compat/freebsd32 freebsd32_misc.c src/sys/kern kern_sig.c src/sys/sys signalvar.h syscallsubr.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2009 10:43:04 -0000 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