From c3eb252046ea4265a5316a8080ba87f917edbef4 Mon Sep 17 00:00:00 2001 From: manu Date: Tue, 16 Dec 2003 13:36:18 +0000 Subject: [PATCH] GPR5 does not hold code, it holds the signal number (this is the first argument to the signal handler). It's an extraordinary luck that test programs worked so far. --- sys/arch/powerpc/powerpc/darwin_machdep.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/arch/powerpc/powerpc/darwin_machdep.c b/sys/arch/powerpc/powerpc/darwin_machdep.c index a4a3b497f544..6f4a9ece0898 100644 --- a/sys/arch/powerpc/powerpc/darwin_machdep.c +++ b/sys/arch/powerpc/powerpc/darwin_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: darwin_machdep.c,v 1.10 2003/10/08 00:40:54 thorpej Exp $ */ +/* $NetBSD: darwin_machdep.c,v 1.11 2003/12/16 13:36:18 manu Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: darwin_machdep.c,v 1.10 2003/10/08 00:40:54 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: darwin_machdep.c,v 1.11 2003/12/16 13:36:18 manu Exp $"); #include #include @@ -77,13 +77,11 @@ darwin_sendsig(ksi, mask) size_t stack_size; sig_t catcher; int sig; - u_long code; int error; tf = trapframe(l); sig = ksi->ksi_signo; - code = ksi->ksi_code; catcher = SIGACTION(p, sig).sa_handler; /* Use an alternate signal stack? */ @@ -163,7 +161,7 @@ darwin_sendsig(ksi, mask) tf->fixreg[1] = (u_long)sfp; tf->fixreg[3] = (u_long)catcher; tf->fixreg[4] = 1; /* 1 => without siginfo, 2 => with siginfo */ - tf->fixreg[5] = (u_long)code; + tf->fixreg[5] = (u_long)sig; tf->fixreg[6] = (u_long)&sfp->duc.si; tf->fixreg[7] = (u_long)&sfp->duc.uctx; tf->lr = (u_long)tf->srr0; @@ -204,7 +202,7 @@ darwin_sys_sigreturn(struct lwp *l, void *v, register_t *retval) if ((error = copyin(SCARG(uap, uctx), &uctx, sizeof(uctx))) != 0) return (error); - /* Check mcontext size, as it is handed by used code */ + /* Check mcontext size, as it is handed by user code */ mcsize = uctx.uc_mcsize; if (mcsize > sizeof(mctx)) mcsize = sizeof(mctx);