summaryrefslogtreecommitdiff
path: root/sys/arch/arm
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/arm
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/arm')
-rw-r--r--sys/arch/arm/arm/sig_machdep.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/arch/arm/arm/sig_machdep.c b/sys/arch/arm/arm/sig_machdep.c
index fd710f677c6..28106a0857d 100644
--- a/sys/arch/arm/arm/sig_machdep.c
+++ b/sys/arch/arm/arm/sig_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sig_machdep.c,v 1.2 2004/02/16 15:40:00 miod Exp $ */
+/* $OpenBSD: sig_machdep.c,v 1.3 2011/04/15 04:52:39 guenther Exp $ */
/* $NetBSD: sig_machdep.c,v 1.22 2003/10/08 00:28:41 thorpej Exp $ */
/*
@@ -87,7 +87,7 @@ sendsig(sig_t catcher, int sig, int returnmask, u_long code, int type,
struct trapframe *tf;
struct sigframe *fp, frame;
struct sigacts *psp = p->p_sigacts;
- int oonstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+ int oonstack = p->p_sigstk.ss_flags & SS_ONSTACK;
int onstack = 0;
tf = process_frame(p);
@@ -95,11 +95,11 @@ sendsig(sig_t catcher, int sig, int returnmask, u_long code, int type,
/* Do we need to jump onto the signal stack? */
/* 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))) {
onstack = 1;
- fp = (struct sigframe *)((caddr_t)psp->ps_sigstk.ss_sp +
- psp->ps_sigstk.ss_size);
+ fp = (struct sigframe *)((caddr_t)p->p_sigstk.ss_sp +
+ p->p_sigstk.ss_size);
} else
fp = (struct sigframe *)tf->tf_usr_sp;
/* make room on the stack */
@@ -135,7 +135,7 @@ sendsig(sig_t catcher, int sig, int returnmask, u_long code, int type,
frame.sf_sc.sc_spsr = tf->tf_spsr;
/* Save signal stack. */
- frame.sf_sc.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+ frame.sf_sc.sc_onstack = p->p_sigstk.ss_flags & SS_ONSTACK;
/* Save signal mask. */
frame.sf_sc.sc_mask = returnmask;
@@ -177,7 +177,7 @@ sendsig(sig_t catcher, int sig, int returnmask, u_long code, int type,
/* Remember that we're now on the signal stack. */
if (onstack)
- psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+ p->p_sigstk.ss_flags |= SS_ONSTACK;
}
#if 0
@@ -270,9 +270,9 @@ sys_sigreturn(struct proc *p, void *v, register_t *retval)
/* Restore signal stack. */
if (context.sc_onstack & SS_ONSTACK)
- psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+ p->p_sigstk.ss_flags |= SS_ONSTACK;
else
- psp->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+ p->p_sigstk.ss_flags &= ~SS_ONSTACK;
/* Restore signal mask. */
#if 0