summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2002-04-04 17:49:48 +0000
committerbde <bde@FreeBSD.org>2002-04-04 17:49:48 +0000
commit14ae95f735978b62fd4a040a2f05a7d5c5a30712 (patch)
tree27b9df7330c17460156c8810b34fef449a2d1764 /sys/compat
parent2a571683e0a57e785364a0bccbf360ed24409bd1 (diff)
downloadFreeBSD-src-14ae95f735978b62fd4a040a2f05a7d5c5a30712.zip
FreeBSD-src-14ae95f735978b62fd4a040a2f05a7d5c5a30712.tar.gz
Moved signal handling and rescheduling from userret() to ast() so that
they aren't in the usual path of execution for syscalls and traps. The main complication for this is that we have to set flags to control ast() everywhere that changes the signal mask. Avoid locking in userret() in most of the remaining cases. Submitted by: luoqi (first part only, long ago, reorganized by me) Reminded by: dillon
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linux/linux_signal.c3
-rw-r--r--sys/compat/svr4/svr4_signal.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c
index ccc30f0..3a5f6e5 100644
--- a/sys/compat/linux/linux_signal.c
+++ b/sys/compat/linux/linux_signal.c
@@ -256,10 +256,12 @@ linux_do_sigprocmask(struct thread *td, int how, l_sigset_t *new,
break;
case LINUX_SIG_UNBLOCK:
SIGSETNAND(p->p_sigmask, mask);
+ signotify(p);
break;
case LINUX_SIG_SETMASK:
p->p_sigmask = mask;
SIG_CANTMASK(p->p_sigmask);
+ signotify(p);
break;
default:
error = EINVAL;
@@ -377,6 +379,7 @@ linux_ssetmask(struct thread *td, struct linux_ssetmask_args *args)
linux_to_bsd_sigset(&lset, &bset);
p->p_sigmask = bset;
SIG_CANTMASK(p->p_sigmask);
+ signotify(p);
PROC_UNLOCK(p);
return (0);
}
diff --git a/sys/compat/svr4/svr4_signal.c b/sys/compat/svr4/svr4_signal.c
index 471022a..fea5317 100644
--- a/sys/compat/svr4/svr4_signal.c
+++ b/sys/compat/svr4/svr4_signal.c
@@ -531,11 +531,13 @@ svr4_sys_sigprocmask(td, uap)
case SVR4_SIG_UNBLOCK:
SIGSETNAND(td->td_proc->p_sigmask, bss);
+ signotify(td->td_proc);
break;
case SVR4_SIG_SETMASK:
td->td_proc->p_sigmask = bss;
SIG_CANTMASK(td->td_proc->p_sigmask);
+ signotify(td->td_proc);
break;
default:
OpenPOWER on IntegriCloud