From 5c29a640b86af6a1bd38d6186b82cba5e9c21065 Mon Sep 17 00:00:00 2001 From: jeff Date: Mon, 17 Feb 2003 09:58:11 +0000 Subject: - Add a new function, thread_signal_add(), that is called from postsig to add a signal to a mailbox's pending set. - Add a new function, thread_signal_upcall(), this causes the current thread to upcall so that we can deliver pending signals. Reviewed by: mini --- sys/kern/subr_trap.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sys/kern/subr_trap.c') diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index 7ffb968..c0c0fd5 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -247,10 +247,17 @@ ast(struct trapframe *framep) mtx_unlock_spin(&sched_lock); } if (sflag & PS_NEEDSIGCHK) { + int sigs; + + sigs = 0; PROC_LOCK(p); - while ((sig = cursig(td)) != 0) + while ((sig = cursig(td)) != 0) { postsig(sig); + sigs++; + } PROC_UNLOCK(p); + if (p->p_flag & P_KSES && sigs) + thread_signal_upcall(td); } userret(td, framep, sticks); -- cgit v1.1