summaryrefslogtreecommitdiff
path: root/sys/arch/alpha
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/alpha
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/alpha')
-rw-r--r--sys/arch/alpha/alpha/machdep.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c
index 9a64256b849..f7c6c247463 100644
--- a/sys/arch/alpha/alpha/machdep.c
+++ b/sys/arch/alpha/alpha/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.128 2010/11/28 21:00:03 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.129 2011/04/15 04:52:39 guenther Exp $ */
/* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */
/*-
@@ -1437,7 +1437,7 @@ sendsig(catcher, sig, mask, code, type, val)
siginfo_t *sip, ksi;
frame = p->p_md.md_tf;
- oonstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+ oonstack = p->p_sigstk.ss_flags & SS_ONSTACK;
fsize = sizeof ksc;
rndfsize = ((fsize + 15) / 16) * 16;
kscsize = rndfsize;
@@ -1453,11 +1453,11 @@ sendsig(catcher, sig, mask, code, type, val)
* will fail if the process has not already allocated
* the space with a `brk'.
*/
- if ((psp->ps_flags & SAS_ALTSTACK) && !oonstack &&
+ if ((p->p_sigstk.ss_flags & SS_DISABLE) == 0 && !oonstack &&
(psp->ps_sigonstack & sigmask(sig))) {
- scp = (struct sigcontext *)(psp->ps_sigstk.ss_sp +
- psp->ps_sigstk.ss_size - rndfsize);
- psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+ scp = (struct sigcontext *)(p->p_sigstk.ss_sp +
+ p->p_sigstk.ss_size - rndfsize);
+ p->p_sigstk.ss_flags |= SS_ONSTACK;
} else
scp = (struct sigcontext *)(alpha_pal_rdusp() - rndfsize);
if ((u_long)scp <= USRSTACK - ptoa(p->p_vmspace->vm_ssize))
@@ -1590,9 +1590,9 @@ sys_sigreturn(p, v, retval)
* Restore the user-supplied information
*/
if (ksc.sc_onstack)
- 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;
p->p_md.md_tf->tf_regs[FRAME_PC] = ksc.sc_pc;