diff options
author | dillon <dillon@FreeBSD.org> | 2001-08-30 18:50:57 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 2001-08-30 18:50:57 +0000 |
commit | 08e732a88ba0d12d11fa8b38d5932c6579273aca (patch) | |
tree | 03a377cd1fcd2a2db481117b689dc177dcae6dd1 /sys/kern/kern_sig.c | |
parent | 2b1fd9ab5e429c28b36e02f8dab6b71ca84c695c (diff) | |
download | FreeBSD-src-08e732a88ba0d12d11fa8b38d5932c6579273aca.zip FreeBSD-src-08e732a88ba0d12d11fa8b38d5932c6579273aca.tar.gz |
Remove the MPSAFE keyword from the parser for syscalls.master.
Instead introduce the [M] prefix to existing keywords. e.g.
MSTD is the MP SAFE version of STD. This is prepatory for a
massive Giant lock pushdown. The old MPSAFE keyword made
syscalls.master too messy.
Begin comments MP-Safe procedures with the comment:
/*
* MPSAFE
*/
This comments means that the procedure may be called without
Giant held (The procedure itself may still need to obtain
Giant temporarily to do its thing).
sv_prepsyscall() is now MP SAFE and assumed to be MP SAFE
sv_transtrap() is now MP SAFE and assumed to be MP SAFE
ktrsyscall() and ktrsysret() are now MP SAFE (Giant Pushdown)
trapsignal() is now MP SAFE (Giant Pushdown)
Places which used to do the if (mtx_owned(&Giant)) mtx_unlock(&Giant)
test in syscall[2]() in */*/trap.c now do not. Instead they
explicitly unlock Giant if they previously obtained it, and then
assert that it is no longer held to catch broken system calls.
Rebuild syscall tables.
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r-- | sys/kern/kern_sig.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 6fcea78..49e8307 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1040,6 +1040,8 @@ pgsignal(pgrp, sig, checkctty) * Send a signal caused by a trap to the current process. * If it will be caught immediately, deliver it with correct code. * Otherwise, post it normally. + * + * MPSAFE */ void trapsignal(p, sig, code) @@ -1049,6 +1051,7 @@ trapsignal(p, sig, code) { register struct sigacts *ps = p->p_sigacts; + mtx_lock(&Giant); PROC_LOCK(p); if ((p->p_flag & P_TRACED) == 0 && SIGISMEMBER(p->p_sigcatch, sig) && !SIGISMEMBER(p->p_sigmask, sig)) { @@ -1081,6 +1084,7 @@ trapsignal(p, sig, code) psignal(p, sig); } PROC_UNLOCK(p); + mtx_unlock(&Giant); } /* |