Source-Changes-HG archive

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

[src/trunk]: src/sys/compat/netbsd32 deal with not having KTRACE



details:   https://anonhg.NetBSD.org/src/rev/60a387651b3d
branches:  trunk
changeset: 347807:60a387651b3d
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Sep 17 02:44:38 2016 +0000

description:
deal with not having KTRACE

diffstat:

 sys/compat/netbsd32/netbsd32.h        |   8 +++++++-
 sys/compat/netbsd32/netbsd32_netbsd.c |   7 +++----
 sys/compat/netbsd32/netbsd32_signal.c |  12 ++++++++----
 3 files changed, 18 insertions(+), 9 deletions(-)

diffs (100 lines):

diff -r 4341167c6f51 -r 60a387651b3d sys/compat/netbsd32/netbsd32.h
--- a/sys/compat/netbsd32/netbsd32.h    Sat Sep 17 02:37:59 2016 +0000
+++ b/sys/compat/netbsd32/netbsd32.h    Sat Sep 17 02:44:38 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32.h,v 1.109 2015/11/26 13:15:34 martin Exp $    */
+/*     $NetBSD: netbsd32.h,v 1.110 2016/09/17 02:44:38 christos Exp $  */
 
 /*
  * Copyright (c) 1998, 2001, 2008, 2015 Matthew R. Green
@@ -1106,6 +1106,12 @@
 void   netbsd32_si_to_si32(siginfo32_t *, const siginfo_t *);
 void   netbsd32_ksi32_to_ksi(struct _ksiginfo *si, const struct __ksiginfo32 *si32);
 
+#ifdef KTRACE
+void netbsd32_ktrpsig(int, sig_t, const sigset_t *, const ksiginfo_t *);
+#else
+#define netbsd32_ktrpsig NULL
+#endif
+
 
 void   startlwp32(void *);
 struct compat_50_netbsd32___semctl14_args;
diff -r 4341167c6f51 -r 60a387651b3d sys/compat/netbsd32/netbsd32_netbsd.c
--- a/sys/compat/netbsd32/netbsd32_netbsd.c     Sat Sep 17 02:37:59 2016 +0000
+++ b/sys/compat/netbsd32/netbsd32_netbsd.c     Sat Sep 17 02:44:38 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_netbsd.c,v 1.203 2016/09/13 07:39:45 martin Exp $     */
+/*     $NetBSD: netbsd32_netbsd.c,v 1.204 2016/09/17 02:44:38 christos Exp $   */
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -27,11 +27,12 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.203 2016/09/13 07:39:45 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.204 2016/09/17 02:44:38 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ddb.h"
 #include "opt_ntp.h"
+#include "opt_ktrace.h"
 #include "opt_compat_netbsd.h"
 #include "opt_compat_43.h"
 #include "opt_sysv.h"
@@ -103,8 +104,6 @@
 void syscall(void);
 #endif
 
-void netbsd32_ktrpsig(int, sig_t, const sigset_t *, const ksiginfo_t *);
-
 #define LIMITCHECK(a, b) ((a) != RLIM_INFINITY && (a) > (b))
 
 #ifdef COMPAT_16
diff -r 4341167c6f51 -r 60a387651b3d sys/compat/netbsd32/netbsd32_signal.c
--- a/sys/compat/netbsd32/netbsd32_signal.c     Sat Sep 17 02:37:59 2016 +0000
+++ b/sys/compat/netbsd32/netbsd32_signal.c     Sat Sep 17 02:44:38 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_signal.c,v 1.40 2016/09/13 07:39:45 martin Exp $      */
+/*     $NetBSD: netbsd32_signal.c,v 1.41 2016/09/17 02:44:38 christos Exp $    */
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_signal.c,v 1.40 2016/09/13 07:39:45 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_signal.c,v 1.41 2016/09/17 02:44:38 christos Exp $");
+
+#if defined(_KERNEL_OPT) 
+#include "opt_ktrace.h"
+#endif
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -52,8 +56,6 @@
 #include <compat/sys/ucontext.h>
 #include <compat/common/compat_sigaltstack.h>
 
-void netbsd32_ktrpsig(int, sig_t, const sigset_t *, const ksiginfo_t *);
-
 int
 netbsd32_sigaction(struct lwp *l, const struct netbsd32_sigaction_args *uap, register_t *retval)
 {
@@ -506,6 +508,7 @@
        /* and optional siginfo_t */
 };
 
+#ifdef KTRACE
 void
 netbsd32_ktrpsig(int sig, sig_t action, const sigset_t *mask,
         const ksiginfo_t *ksi)
@@ -539,5 +542,6 @@
 
        ktraddentry(l, kte, KTA_WAITOK);
 }
+#endif
 
 



Home | Main Index | Thread Index | Old Index