Source-Changes-HG archive

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

[src/trunk]: src/sys/sys move more kernel stuff under #ifdef _KERNEL



details:   https://anonhg.NetBSD.org/src/rev/f3d7918c58ab
branches:  trunk
changeset: 813292:f3d7918c58ab
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jan 23 20:44:06 2016 +0000

description:
move more kernel stuff under #ifdef _KERNEL

diffstat:

 sys/sys/systm.h |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (64 lines):

diff -r fb9b875eaf50 -r f3d7918c58ab sys/sys/systm.h
--- a/sys/sys/systm.h   Sat Jan 23 20:28:24 2016 +0000
+++ b/sys/sys/systm.h   Sat Jan 23 20:44:06 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: systm.h,v 1.269 2015/10/29 00:27:08 mrg Exp $  */
+/*     $NetBSD: systm.h,v 1.270 2016/01/23 20:44:06 christos Exp $     */
 
 /*-
  * Copyright (c) 1982, 1988, 1991, 1993
@@ -114,6 +114,7 @@
 
 extern const dev_t zerodev;    /* /dev/zero */
 
+#if defined(_KERNEL)
 typedef int    sy_call_t(struct lwp *, const void *, register_t *);
 
 extern struct sysent {         /* system call table */
@@ -125,6 +126,8 @@
        uint32_t sy_return;     /* DTrace return ID for systrace. */
 } sysent[];
 extern int nsysent;
+#endif
+
 #if    BYTE_ORDER == BIG_ENDIAN
 #define        SCARG(p,k)      ((p)->k.be.datum)       /* get arg from args pointer */
 #elif  BYTE_ORDER == LITTLE_ENDIAN
@@ -486,7 +489,6 @@
 #else
 #define console_debugger() do {} while (/* CONSTCOND */ 0) /* NOP */
 #endif
-#endif /* _KERNEL */
 
 /* For SYSCALL_DEBUG */
 void scdebug_init(void);
@@ -498,7 +500,6 @@
 void   _kernel_unlock(int, int *);
 bool   _kernel_locked_p(void);
 
-#ifdef _KERNEL
 void   kernconfig_lock_init(void);
 void   kernconfig_lock(void);
 void   kernconfig_unlock(void);
@@ -523,11 +524,13 @@
 #define        KERNEL_UNLOCK_ALL(l, p)         KERNEL_UNLOCK(0, (l), (p))
 #define        KERNEL_UNLOCK_ONE(l)            KERNEL_UNLOCK(1, (l), NULL)
 
+#ifdef _KERNEL
 /* Preemption control. */
-#ifdef _KERNEL
 void   kpreempt_disable(void);
 void   kpreempt_enable(void);
 bool   kpreempt_disabled(void);
+
+vaddr_t calc_cache_size(vsize_t , int, int);
 #endif
 
 void assert_sleepable(void);
@@ -537,6 +540,5 @@
 #define        ASSERT_SLEEPABLE()      do {} while (0)
 #endif /* defined(DEBUG) */
 
-vaddr_t calc_cache_size(vsize_t , int, int);
 
 #endif /* !_SYS_SYSTM_H_ */



Home | Main Index | Thread Index | Old Index