diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-12-08 18:38:24 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-12-08 18:38:24 +0000 |
commit | af09b4aef208a3f14afa115006e61273a8640324 (patch) | |
tree | 409cffeace1d32e6581baf2e9d304e61c463854d | |
parent | 976fe28a5a9e3db4cadf61062a91a55368c3f8fd (diff) |
Do not pass a siginfo_t * pointer to the signal handler if no siginfo
is required.
-rw-r--r-- | sys/arch/m88k/m88k/sig_machdep.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/m88k/m88k/sig_machdep.c b/sys/arch/m88k/m88k/sig_machdep.c index 0f8144a8439..1478743b52c 100644 --- a/sys/arch/m88k/m88k/sig_machdep.c +++ b/sys/arch/m88k/m88k/sig_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sig_machdep.c,v 1.6 2007/11/21 18:52:52 miod Exp $ */ +/* $OpenBSD: sig_machdep.c,v 1.7 2007/12/08 18:38:23 miod Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -159,7 +159,9 @@ sendsig(sig_t catcher, int sig, int mask, unsigned long code, int type, */ tf->tf_r[1] = p->p_sigcode; /* return to sigcode */ tf->tf_r[2] = sig; /* first arg is signo */ - tf->tf_r[3] = (vaddr_t)&fp->sf_si; /* second arg is siginfo */ + tf->tf_r[3] = psp->ps_siginfo & sigmask(sig) ? (vaddr_t)&fp->sf_si : 0; + tf->tf_r[4] = (vaddr_t)&fp->sf_sc; + tf->tf_r[31] = (vaddr_t)fp; addr = (vaddr_t)catcher; /* and resume in the handler */ #ifdef M88100 if (CPU_IS88100) { @@ -172,7 +174,6 @@ sendsig(sig_t catcher, int sig, int mask, unsigned long code, int type, tf->tf_exip = (addr & XIP_ADDR); } #endif - tf->tf_r[31] = (vaddr_t)fp; #ifdef DEBUG if ((sigdebug & SDB_FOLLOW) || |