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/subr_trap.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/kern/subr_trap.c') diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index b2fc0fc..9eaa5b8 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -245,10 +245,12 @@ ast(struct trapframe *framep) sigs = 0; PROC_LOCK(p); + mtx_lock(&p->p_sigacts->ps_mtx); while ((sig = cursig(td)) != 0) { postsig(sig); sigs++; } + mtx_unlock(&p->p_sigacts->ps_mtx); PROC_UNLOCK(p); if (p->p_flag & P_THREADED && sigs) { struct kse_upcall *ku = td->td_upcall; -- cgit v1.1