diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-04-15 04:52:41 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-04-15 04:52:41 +0000 |
commit | 71771abcbf45c58af4735979b21a2e7604cb42bf (patch) | |
tree | 1e12c4f7e6473b7549d0bf973e6f96bd314644b8 /sys/arch/mips64 | |
parent | 847e8a9bf0e99af86e8791ea570d84b9d3bc54f9 (diff) |
Correct the sharing of the signal handling state: stuff that should
be shared (p_sigignore, p_sigcatch, P_NOCLDSTOP, P_NOCLDWAIT) moves
to struct sigacts, wihle stuff that should be per rthread (ps_oldmask,
SAS_OLDMASK, ps_sigstk) moves to struct proc. Treat the coredumping
state bits (ps_sig, ps_code, ps_type, ps_sigval) as per-rthread
until our locking around coredumping is better.
Oh, and remove the old SunOS-compat ps_usertramp member.
"I like the sound of this" tedu@
Diffstat (limited to 'sys/arch/mips64')
-rw-r--r-- | sys/arch/mips64/mips64/sendsig.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/arch/mips64/mips64/sendsig.c b/sys/arch/mips64/mips64/sendsig.c index 21b925b71e2..117b484677b 100644 --- a/sys/arch/mips64/mips64/sendsig.c +++ b/sys/arch/mips64/mips64/sendsig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sendsig.c,v 1.14 2011/04/07 15:30:15 miod Exp $ */ +/* $OpenBSD: sendsig.c,v 1.15 2011/04/15 04:52:39 guenther Exp $ */ /* * Copyright (c) 1990 The Regents of the University of California. @@ -115,7 +115,7 @@ sendsig(catcher, sig, mask, code, type, val) struct sigcontext ksc; regs = p->p_md.md_regs; - oonstack = psp->ps_sigstk.ss_flags & SA_ONSTACK; + oonstack = p->p_sigstk.ss_flags & SA_ONSTACK; /* * Allocate and validate space for the signal handler * context. Note that if the stack is in data space, the @@ -126,12 +126,12 @@ sendsig(catcher, sig, mask, code, type, val) fsize = sizeof(struct sigframe); if (!(psp->ps_siginfo & sigmask(sig))) fsize -= sizeof(siginfo_t); - if ((psp->ps_flags & SAS_ALTSTACK) && - (psp->ps_sigstk.ss_flags & SA_ONSTACK) == 0 && + if ((p->p_sigstk.ss_flags & SS_DISABLE) == 0 && + (p->p_sigstk.ss_flags & SA_ONSTACK) == 0 && (psp->ps_sigonstack & sigmask(sig))) { - fp = (struct sigframe *)(psp->ps_sigstk.ss_sp + - psp->ps_sigstk.ss_size - fsize); - psp->ps_sigstk.ss_flags |= SA_ONSTACK; + fp = (struct sigframe *)(p->p_sigstk.ss_sp + + p->p_sigstk.ss_size - fsize); + p->p_sigstk.ss_flags |= SA_ONSTACK; } else fp = (struct sigframe *)(regs->sp - fsize); if ((vaddr_t)fp <= USRSTACK - ptoa(p->p_vmspace->vm_ssize)) @@ -255,9 +255,9 @@ sys_sigreturn(p, v, retval) * Restore the user supplied information */ if (scp->sc_onstack & SA_ONSTACK) - p->p_sigacts->ps_sigstk.ss_flags |= SA_ONSTACK; + p->p_sigstk.ss_flags |= SA_ONSTACK; else - p->p_sigacts->ps_sigstk.ss_flags &= ~SA_ONSTACK; + p->p_sigstk.ss_flags &= ~SA_ONSTACK; p->p_sigmask = scp->sc_mask &~ sigcantmask; regs->pc = scp->sc_pc; regs->mullo = scp->mullo; |