diff options
author | jhb <jhb@FreeBSD.org> | 2002-06-07 05:43:02 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2002-06-07 05:43:02 +0000 |
commit | 11b212e025463c64510690ae13461432242c8504 (patch) | |
tree | 3e9f5ce67d7b84b8c62eb552dd448cccbd4a1bd2 /sys/kern/kern_sig.c | |
parent | b83763b2494f24805b7f84aad3be3da87ea5100e (diff) | |
download | FreeBSD-src-11b212e025463c64510690ae13461432242c8504.zip FreeBSD-src-11b212e025463c64510690ae13461432242c8504.tar.gz |
- trapsignal() no longer needs to acquire Giant for ktrpsig().
- Catch up to new ktrace API.
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r-- | sys/kern/kern_sig.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index a230581..8af0280 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1193,15 +1193,14 @@ 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)) { p->p_stats->p_ru.ru_nsignals++; #ifdef KTRACE - if (KTRPOINT(p, KTR_PSIG)) - ktrpsig(p->p_tracep, sig, ps->ps_sigact[_SIG_IDX(sig)], - &p->p_sigmask, code); + if (KTRPOINT(curthread, KTR_PSIG)) + ktrpsig(sig, ps->ps_sigact[_SIG_IDX(sig)], + &p->p_sigmask, code); #endif (*p->p_sysent->sv_sendsig)(ps->ps_sigact[_SIG_IDX(sig)], sig, &p->p_sigmask, code); @@ -1224,7 +1223,6 @@ trapsignal(p, sig, code) psignal(p, sig); } PROC_UNLOCK(p); - mtx_unlock(&Giant); } /* @@ -1735,8 +1733,8 @@ postsig(sig) SIGDELSET(p->p_siglist, sig); action = ps->ps_sigact[_SIG_IDX(sig)]; #ifdef KTRACE - if (KTRPOINT(p, KTR_PSIG)) - ktrpsig(p->p_tracep, sig, action, p->p_flag & P_OLDMASK ? + if (KTRPOINT(td, KTR_PSIG)) + ktrpsig(sig, action, p->p_flag & P_OLDMASK ? &p->p_oldsigmask : &p->p_sigmask, 0); #endif _STOPEVENT(p, S_SIG, sig); |