From owner-cvs-all Sat Apr 13 16:33:47 2002 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D43EB37B419; Sat, 13 Apr 2002 16:33:37 -0700 (PDT) Received: (from jhb@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3DNXbt14699; Sat, 13 Apr 2002 16:33:37 -0700 (PDT) (envelope-from jhb) Message-Id: <200204132333.g3DNXbt14699@freefall.freebsd.org> From: John Baldwin Date: Sat, 13 Apr 2002 16:33:37 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_sig.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG jhb 2002/04/13 16:33:37 PDT Modified files: sys/kern kern_sig.c Log: - Change killpg1()'s first argument to be a thread instead of a process so we can use td_ucred. - In killpg1(), the proc lock is sufficient to check if p_stat is SZOMB or not. We don't need sched_lock. - Close some races in psignal(). In psignal() there is a big switch statement based on p_stat. All the different cases are assuming that the process (or thread) isn't going to change state out from under it. To ensure this is true, just lock sched_lock for the entire switch. We practically held it the entire time already anyways. This also simplifies the locking somewhat and actually results in fewer lock operations. - Allow signotify() to be called with the sched_lock held since psignal() now does that. - Use td_ucred in a couple of places. Revision Changes Path 1.155 +22 -36 src/sys/kern/kern_sig.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message