From 89a4eb17deddba4ba8bfb0cf7c6801a608731f8c Mon Sep 17 00:00:00 2001 From: jhb Date: Tue, 13 May 2003 20:36:02 +0000 Subject: - Merge struct procsig with struct sigacts. - Move struct sigacts out of the u-area and malloc() it using the M_SUBPROC malloc bucket. - Add a small sigacts_*() API for managing sigacts structures: sigacts_alloc(), sigacts_free(), sigacts_copy(), sigacts_share(), and sigacts_shared(). - Remove the p_sigignore, p_sigacts, and p_sigcatch macros. - Add a mutex to struct sigacts that protects all the members of the struct. - Add sigacts locking. - Remove Giant from nosys(), kill(), killpg(), and kern_sigaction() now that sigacts is locked. - Several in-kernel functions such as psignal(), tdsignal(), trapsignal(), and thread_stopped() are now MP safe. Reviewed by: arch@ Approved by: re (rwatson) --- sys/kern/kern_kthread.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/kern/kern_kthread.c') diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c index d4846dd..7d38520 100644 --- a/sys/kern/kern_kthread.c +++ b/sys/kern/kern_kthread.c @@ -94,7 +94,9 @@ kthread_create(void (*func)(void *), void *arg, /* this is a non-swapped system process */ PROC_LOCK(p2); p2->p_flag |= P_SYSTEM | P_KTHREAD; - p2->p_procsig->ps_flag |= PS_NOCLDWAIT; + mtx_lock(&p2->p_sigacts->ps_mtx); + p2->p_sigacts->ps_flag |= PS_NOCLDWAIT; + mtx_unlock(&p2->p_sigacts->ps_mtx); _PHOLD(p2); PROC_UNLOCK(p2); -- cgit v1.1