Source-Changes-HG archive

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

[src/trunk]: src/sys/compat/netbsd32 Sort by signal numbers as far as possibl...



details:   https://anonhg.NetBSD.org/src/rev/fdb697026fe0
branches:  trunk
changeset: 461182:fdb697026fe0
user:      rin <rin%NetBSD.org@localhost>
date:      Mon Nov 18 04:58:42 2019 +0000

description:
Sort by signal numbers as far as possible, adjust locations of functions.
No functional changes intended.

XXX
pullup to netbsd-9

diffstat:

 sys/compat/netbsd32/netbsd32_signal.c |  44 +++++++++++++++++-----------------
 1 files changed, 22 insertions(+), 22 deletions(-)

diffs (114 lines):

diff -r a40d502085e3 -r fdb697026fe0 sys/compat/netbsd32/netbsd32_signal.c
--- a/sys/compat/netbsd32/netbsd32_signal.c     Mon Nov 18 04:38:48 2019 +0000
+++ b/sys/compat/netbsd32/netbsd32_signal.c     Mon Nov 18 04:58:42 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_signal.c,v 1.46 2019/11/18 04:09:53 rin Exp $ */
+/*     $NetBSD: netbsd32_signal.c,v 1.47 2019/11/18 04:58:42 rin Exp $ */
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_signal.c,v 1.46 2019/11/18 04:09:53 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_signal.c,v 1.47 2019/11/18 04:58:42 rin Exp $");
 
 #if defined(_KERNEL_OPT) 
 #include "opt_ktrace.h"
@@ -197,9 +197,9 @@
 
        switch (si32->_signo) {
        case SIGILL:
+       case SIGFPE:
        case SIGBUS:
        case SIGSEGV:
-       case SIGFPE:
 fill_fault:
                si->_reason._fault._addr =
                    NETBSD32IPTR64(si32->_reason._fault._addr);
@@ -227,6 +227,11 @@
                si->_reason._rt._value.sival_int =
                    si32->_reason._rt._value.sival_int;
                break;
+       case SIGURG:
+       case SIGIO:
+               si->_reason._poll._band = si32->_reason._poll._band;
+               si->_reason._poll._fd = si32->_reason._poll._fd;
+               break;
        case SIGCHLD:
                si->_reason._child._pid = si32->_reason._child._pid;
                si->_reason._child._uid = si32->_reason._child._uid;
@@ -234,14 +239,17 @@
                si->_reason._child._utime = si32->_reason._child._utime;
                si->_reason._child._stime = si32->_reason._child._stime;
                break;
-       case SIGURG:
-       case SIGIO:
-               si->_reason._poll._band = si32->_reason._poll._band;
-               si->_reason._poll._fd = si32->_reason._poll._fd;
-               break;
        }
 }
 
+void
+netbsd32_si32_to_si(siginfo_t *si, const siginfo32_t *si32)
+{
+
+       memset(si, 0, sizeof (*si));
+       netbsd32_ksi32_to_ksi(&si->_info, &si32->_info);
+}
+
 static void
 netbsd32_ksi_to_ksi32(struct __ksiginfo32 *si32, const struct _ksiginfo *si)
 {
@@ -254,9 +262,9 @@
 
        switch (si->_signo) {
        case SIGILL:
+       case SIGFPE:
        case SIGBUS:
        case SIGSEGV:
-       case SIGFPE:
 fill_fault:
                si32->_reason._fault._addr =
                    NETBSD32PTR32I(si->_reason._fault._addr);
@@ -284,6 +292,11 @@
                si32->_reason._rt._value.sival_int =
                    si->_reason._rt._value.sival_int;
                break;
+       case SIGURG:
+       case SIGIO:
+               si32->_reason._poll._band = si->_reason._poll._band;
+               si32->_reason._poll._fd = si->_reason._poll._fd;
+               break;
        case SIGCHLD:
                si32->_reason._child._pid = si->_reason._child._pid;
                si32->_reason._child._uid = si->_reason._child._uid;
@@ -291,11 +304,6 @@
                si32->_reason._child._utime = si->_reason._child._utime;
                si32->_reason._child._stime = si->_reason._child._stime;
                break;
-       case SIGURG:
-       case SIGIO:
-               si32->_reason._poll._band = si->_reason._poll._band;
-               si32->_reason._poll._fd = si->_reason._poll._fd;
-               break;
        }
 }
 
@@ -308,14 +316,6 @@
 }
 
 void
-netbsd32_si32_to_si(siginfo_t *si, const siginfo32_t *si32)
-{
-
-       memset(si, 0, sizeof (*si));
-       netbsd32_ksi32_to_ksi(&si->_info, &si32->_info);
-}
-
-void
 getucontext32(struct lwp *l, ucontext32_t *ucp)
 {
        struct proc *p = l->l_proc;



Home | Main Index | Thread Index | Old Index