summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2011-04-15 04:52:41 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2011-04-15 04:52:41 +0000
commit71771abcbf45c58af4735979b21a2e7604cb42bf (patch)
tree1e12c4f7e6473b7549d0bf973e6f96bd314644b8 /sys/arch/sparc
parent847e8a9bf0e99af86e8791ea570d84b9d3bc54f9 (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/sparc')
-rw-r--r--sys/arch/sparc/sparc/machdep.c16
-rw-r--r--sys/arch/sparc/sparc/svr4_machdep.c14
2 files changed, 15 insertions, 15 deletions
diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c
index d0f7f23502d..2e1cda76f1d 100644
--- a/sys/arch/sparc/sparc/machdep.c
+++ b/sys/arch/sparc/sparc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.132 2011/04/07 15:30:16 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.133 2011/04/15 04:52:40 guenther Exp $ */
/* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */
/*
@@ -395,16 +395,16 @@ sendsig(catcher, sig, mask, code, type, val)
tf = p->p_md.md_tf;
oldsp = tf->tf_out[6];
- oonstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+ oonstack = p->p_sigstk.ss_flags & SS_ONSTACK;
/*
* Compute new user stack addresses, subtract off
* one signal frame, and align.
*/
- if ((psp->ps_flags & SAS_ALTSTACK) && !oonstack &&
+ if ((p->p_sigstk.ss_flags & SS_DISABLE) == 0 && !oonstack &&
(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 *)oldsp;
fp = (struct sigframe *)((int)(fp - 1) & ~7);
@@ -535,9 +535,9 @@ sys_sigreturn(p, v, retval)
tf->tf_out[0] = ksc.sc_o0;
tf->tf_out[6] = ksc.sc_sp;
if (ksc.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 = ksc.sc_mask & ~sigcantmask;
return (EJUSTRETURN);
}
diff --git a/sys/arch/sparc/sparc/svr4_machdep.c b/sys/arch/sparc/sparc/svr4_machdep.c
index 1228ea135a0..ac557916175 100644
--- a/sys/arch/sparc/sparc/svr4_machdep.c
+++ b/sys/arch/sparc/sparc/svr4_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: svr4_machdep.c,v 1.14 2010/06/26 23:24:44 guenther Exp $ */
+/* $OpenBSD: svr4_machdep.c,v 1.15 2011/04/15 04:52:40 guenther Exp $ */
/* $NetBSD: svr4_machdep.c,v 1.24 1997/07/29 10:04:45 fair Exp $ */
/*
@@ -220,7 +220,7 @@ svr4_setcontext(p, uc)
register struct trapframe *tf;
svr4_greg_t *r = uc->uc_mcontext.greg;
struct svr4_sigaltstack *s = &uc->uc_stack;
- struct sigaltstack *sf = &psp->ps_sigstk;
+ struct sigaltstack *sf = &p->p_sigstk;
int mask;
#ifdef FPU_CONTEXT
svr4_fregset_t *f = &uc->uc_mcontext.freg;
@@ -462,16 +462,16 @@ svr4_sendsig(catcher, sig, mask, code, type, val)
tf = (struct trapframe *)p->p_md.md_tf;
oldsp = tf->tf_out[6];
- oonstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+ oonstack = p->p_sigstk.ss_flags & SS_ONSTACK;
/*
* Allocate space for the signal handler context.
*/
- if ((psp->ps_flags & SAS_ALTSTACK) && !oonstack &&
+ if ((p->p_sigstk.ss_flags & SS_DISABLE) == 0 && !oonstack &&
(psp->ps_sigonstack & sigmask(sig))) {
- fp = (struct svr4_sigframe *)(psp->ps_sigstk.ss_sp +
- psp->ps_sigstk.ss_size);
- psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+ fp = (struct svr4_sigframe *)(p->p_sigstk.ss_sp +
+ p->p_sigstk.ss_size);
+ p->p_sigstk.ss_flags |= SS_ONSTACK;
} else {
fp = (struct svr4_sigframe *)oldsp;
}