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/macppc | |
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/macppc')
-rw-r--r-- | sys/arch/macppc/macppc/machdep.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c index dc738063938..9dfd408df65 100644 --- a/sys/arch/macppc/macppc/machdep.c +++ b/sys/arch/macppc/macppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.123 2011/01/08 18:10:23 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.124 2011/04/15 04:52:39 guenther Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -576,17 +576,17 @@ sendsig(sig_t catcher, int sig, int mask, u_long code, int type, frame.sf_signum = sig; tf = trapframe(p); - oldonstack = psp->ps_sigstk.ss_flags & SS_ONSTACK; + oldonstack = p->p_sigstk.ss_flags & SS_ONSTACK; /* * Allocate stack space for signal handler. */ - if ((psp->ps_flags & SAS_ALTSTACK) + if ((p->p_sigstk.ss_flags & SS_DISABLE) == 0 && !oldonstack && (psp->ps_sigonstack & sigmask(sig))) { - fp = (struct sigframe *)(psp->ps_sigstk.ss_sp - + psp->ps_sigstk.ss_size); - psp->ps_sigstk.ss_flags |= SS_ONSTACK; + fp = (struct sigframe *)(p->p_sigstk.ss_sp + + p->p_sigstk.ss_size); + p->p_sigstk.ss_flags |= SS_ONSTACK; } else fp = (struct sigframe *)tf->fixreg[1]; @@ -642,9 +642,9 @@ sys_sigreturn(struct proc *p, void *v, register_t *retval) return EINVAL; bcopy(&sc.sc_frame, tf, sizeof *tf); if (sc.sc_onstack & 1) - p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK; + p->p_sigstk.ss_flags |= SS_ONSTACK; else - p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK; + p->p_sigstk.ss_flags &= ~SS_ONSTACK; p->p_sigmask = sc.sc_mask & ~sigcantmask; return EJUSTRETURN; } |