Source-Changes-HG archive

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

[src/pgoyette-compat]: src/sys/arch/mips/mips Remove unnecesasry #ifdef COMPA...



details:   https://anonhg.NetBSD.org/src/rev/10d0f2411b80
branches:  pgoyette-compat
changeset: 830829:10d0f2411b80
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Sat Sep 29 07:36:44 2018 +0000

description:
Remove unnecesasry #ifdef COMPAT_16 (this file won't get selected unless
COMPAT_16 is defined).

Rename some functions for consistency with other architectures' machdep
code.

Provide some prototypes/declarations.

Use __func__ in a diagnostic message rather than hardcoding it in the
message string.

diffstat:

 sys/arch/mips/mips/netbsd32_machdep_16.c |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (72 lines):

diff -r db303fda3605 -r 10d0f2411b80 sys/arch/mips/mips/netbsd32_machdep_16.c
--- a/sys/arch/mips/mips/netbsd32_machdep_16.c  Sat Sep 29 07:34:12 2018 +0000
+++ b/sys/arch/mips/mips/netbsd32_machdep_16.c  Sat Sep 29 07:36:44 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_machdep_16.c,v 1.1.2.2 2018/09/29 06:55:33 pgoyette Exp $     */
+/*     $NetBSD: netbsd32_machdep_16.c,v 1.1.2.3 2018/09/29 07:36:44 pgoyette Exp $     */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_16.c,v 1.1.2.2 2018/09/29 06:55:33 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_16.c,v 1.1.2.3 2018/09/29 07:36:44 pgoyette Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_coredump.h"
@@ -69,7 +69,10 @@
 
 void netbsd32_sendsig_siginfo(const ksiginfo_t *, const sigset_t *);
 
-#ifdef COMPAT_16
+int netbsd32_sendsig_16(const ksiginfo_t *, const sigset_t *);
+
+extern struct netbsd32_sendsig_hook_t netbsd32_sendsig_hook;
+
 int
 compat_16_netbsd32___sigreturn14(struct lwp *l,
        const struct compat_16_netbsd32___sigreturn14_args *uap,
@@ -81,7 +84,6 @@
 
        return compat_16_sys___sigreturn14(l, &ua, retval);
 }
-#endif
 
 struct sigframe_siginfo32 {
        siginfo32_t sf_si;
@@ -92,7 +94,7 @@
  * Send a signal to process.
  */
 static void
-netbsd32_sendsig_siginfo(const ksiginfo_t *ksi, const sigset_t *mask)
+netbsd32_sendsig_sigcontext(const ksiginfo_t *ksi, const sigset_t *mask)
 {
        struct lwp * const l = curlwp;
        struct proc * const p = l->l_proc;
@@ -114,7 +116,7 @@
         case 0:         /* handled by sendsig_sigcontext */
         case 1:         /* handled by sendsig_sigcontext */
         default:        /* unknown version */
-                printf("sendsig_siginfo: bad version %d\n",
+                printf("%s: bad version %d\n", __func__,
                     ps->sa_sigdesc[sig].sd_vers);
                 sigexit(l, SIGILL);
         case 2:
@@ -166,14 +168,12 @@
                l->l_sigstk.ss_flags |= SS_ONSTACK;
 }
 
-void    
+int
 netbsd32_sendsig_16(const ksiginfo_t *ksi, const sigset_t *mask)
 {               
-#ifdef COMPAT_16    
        if (curproc->p_sigacts->sa_sigdesc[ksi->ksi_signo].sd_vers < 2)
                netbsd32_sendsig_sigcontext(ksi, mask);
        else    
-#endif  
                netbsd32_sendsig_siginfo(ksi, mask);
 }       
 



Home | Main Index | Thread Index | Old Index