diff options
author | jhb <jhb@FreeBSD.org> | 2003-05-09 19:11:32 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-05-09 19:11:32 +0000 |
commit | 9efb8e111eeacb32cd051d841afeceb0cd63ac09 (patch) | |
tree | fca6e9a8528ff4b4c49875da4ba59f9fe6a29162 | |
parent | 769c145dbe2523d1a6a3743d69cb46a8b3b22ece (diff) | |
download | FreeBSD-src-9efb8e111eeacb32cd051d841afeceb0cd63ac09.zip FreeBSD-src-9efb8e111eeacb32cd051d841afeceb0cd63ac09.tar.gz |
Remove Giant from kern_sigsuspend() and osigsuspend() as these should now
be MP safe.
Approved by: re (scottl)
-rw-r--r-- | sys/kern/kern_sig.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 2e61556..dd2fb3e 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1072,7 +1072,6 @@ int kern_sigsuspend(struct thread *td, sigset_t mask) { struct proc *p = td->td_proc; - register struct sigacts *ps; /* * When returning from sigsuspend, we want @@ -1081,9 +1080,7 @@ kern_sigsuspend(struct thread *td, sigset_t mask) * save it here and mark the sigacts structure * to indicate this. */ - mtx_lock(&Giant); PROC_LOCK(p); - ps = p->p_sigacts; td->td_oldsigmask = td->td_sigmask; mtx_lock_spin(&sched_lock); td->td_flags |= TDF_OLDMASK; @@ -1091,10 +1088,9 @@ kern_sigsuspend(struct thread *td, sigset_t mask) SIG_CANTMASK(mask); td->td_sigmask = mask; signotify(td); - while (msleep(ps, &p->p_mtx, PPAUSE|PCATCH, "pause", 0) == 0) + while (msleep(p->p_sigacts, &p->p_mtx, PPAUSE|PCATCH, "pause", 0) == 0) /* void */; PROC_UNLOCK(p); - mtx_unlock(&Giant); /* always return EINTR rather than ERESTART... */ return (EINTR); } @@ -1116,11 +1112,8 @@ osigsuspend(td, uap) { struct proc *p = td->td_proc; sigset_t mask; - register struct sigacts *ps; - mtx_lock(&Giant); PROC_LOCK(p); - ps = p->p_sigacts; td->td_oldsigmask = td->td_sigmask; mtx_lock_spin(&sched_lock); td->td_flags |= TDF_OLDMASK; @@ -1129,10 +1122,9 @@ osigsuspend(td, uap) SIG_CANTMASK(mask); SIGSETLO(td->td_sigmask, mask); signotify(td); - while (msleep(ps, &p->p_mtx, PPAUSE|PCATCH, "opause", 0) == 0) + while (msleep(p->p_sigacts, &p->p_mtx, PPAUSE|PCATCH, "opause", 0) == 0) /* void */; PROC_UNLOCK(p); - mtx_unlock(&Giant); /* always return EINTR rather than ERESTART... */ return (EINTR); } |