Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys SA_SIGINFO support for m68k (emul linux)



details:   https://anonhg.NetBSD.org/src/rev/46676ea9f545
branches:  trunk
changeset: 552259:46676ea9f545
user:      cl <cl%NetBSD.org@localhost>
date:      Mon Sep 22 14:36:42 2003 +0000

description:
SA_SIGINFO support for m68k (emul linux)

diffstat:

 sys/arch/m68k/m68k/linux_trap.c            |   8 ++++----
 sys/compat/linux/arch/m68k/linux_machdep.c |  29 ++++++++---------------------
 2 files changed, 12 insertions(+), 25 deletions(-)

diffs (83 lines):

diff -r 5bcba65fe50d -r 46676ea9f545 sys/arch/m68k/m68k/linux_trap.c
--- a/sys/arch/m68k/m68k/linux_trap.c   Mon Sep 22 14:35:58 2003 +0000
+++ b/sys/arch/m68k/m68k/linux_trap.c   Mon Sep 22 14:36:42 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_trap.c,v 1.3 2003/07/15 02:43:13 lukem Exp $     */
+/*     $NetBSD: linux_trap.c,v 1.4 2003/09/22 14:36:42 cl Exp $        */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_trap.c,v 1.3 2003/07/15 02:43:13 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_trap.c,v 1.4 2003/09/22 14:36:42 cl Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -51,6 +51,6 @@
 #include <compat/linux/common/linux_exec.h>
 
 void
-linux_trapsignal(struct lwp *l, int signo, u_long type) {
-       trapsignal(l, signo, type);
+linux_trapsignal(struct lwp *l, ksiginfo_t *ksi) {
+       trapsignal(l, ksi);
 }
diff -r 5bcba65fe50d -r 46676ea9f545 sys/compat/linux/arch/m68k/linux_machdep.c
--- a/sys/compat/linux/arch/m68k/linux_machdep.c        Mon Sep 22 14:35:58 2003 +0000
+++ b/sys/compat/linux/arch/m68k/linux_machdep.c        Mon Sep 22 14:36:42 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_machdep.c,v 1.18 2003/08/02 19:21:50 jdolecek Exp $      */
+/*     $NetBSD: linux_machdep.c,v 1.19 2003/09/22 14:36:43 cl Exp $    */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.18 2003/08/02 19:21:50 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.19 2003/09/22 14:36:43 cl Exp $");
 
 #define COMPAT_LINUX 1
 
@@ -451,31 +451,18 @@
  * Send an interrupt to Linux process.
  */
 void
-linux_sendsig(sig, mask, code)
-       int sig;
-       sigset_t *mask;
-       u_long code;
+linux_sendsig(ksiginfo_t *ksi, sigset_t *mask)
 {
+       /* u_long code = ksi->ksi_trap; */
+       int sig = ksi->ksi_signo;
        struct lwp *l = curlwp;
        struct proc *p = l->l_proc;
-       struct frame *frame;
-       caddr_t usp;            /* user stack for signal context */
+       struct frame *frame = (struct frame *)l->l_md.md_regs;
        int onstack;
+       /* user stack for signal context */
+       caddr_t usp = getframe(l, sig, &onstack);
        sig_t catcher = SIGACTION(p, sig).sa_handler;
 
-       frame = (struct frame *)l->l_md.md_regs;
-
-       /* Do we need to jump onto the signal stack? */
-       onstack = (p->p_sigctx.ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-                 (SIGACTION(p, sig).sa_flags & SA_ONSTACK) != 0;
-
-       /* Determine user stack for the signal handler context. */
-       if (onstack)
-               usp = (caddr_t)p->p_sigctx.ps_sigstk.ss_sp
-                               + p->p_sigctx.ps_sigstk.ss_size;
-       else
-               usp = (caddr_t)frame->f_regs[SP];
-
        /* Setup the signal frame (and part of the trapframe). */
        if (SIGACTION(p, sig).sa_flags & SA_SIGINFO)
                setup_linux_rt_sigframe(frame, sig, mask, usp, l);



Home | Main Index | Thread Index | Old Index