Source-Changes-HG archive

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

[src/trunk]: src/sys/sys only include mallocvar.h if _KERNEL is defined [hi t...



details:   https://anonhg.NetBSD.org/src/rev/67b13ea2e8e0
branches:  trunk
changeset: 542585:67b13ea2e8e0
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Feb 02 02:22:14 2003 +0000

description:
only include mallocvar.h if _KERNEL is defined [hi thorpej]

diffstat:

 sys/sys/event.h  |  4 ++--
 sys/sys/malloc.h |  5 +++--
 sys/sys/savar.h  |  7 +++++--
 3 files changed, 10 insertions(+), 6 deletions(-)

diffs (80 lines):

diff -r 5f2b3d5792a3 -r 67b13ea2e8e0 sys/sys/event.h
--- a/sys/sys/event.h   Sun Feb 02 02:21:43 2003 +0000
+++ b/sys/sys/event.h   Sun Feb 02 02:22:14 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: event.h,v 1.4 2003/02/01 06:23:50 thorpej Exp $        */
+/*     $NetBSD: event.h,v 1.5 2003/02/02 02:22:14 christos Exp $       */
 /*-
  * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon%FreeBSD.org@localhost>
  * All rights reserved.
@@ -32,7 +32,6 @@
 
 #include <sys/inttypes.h>              /* for uintptr_t */
 #include <sys/null.h>                  /* for NULL */
-#include <sys/mallocvar.h>             /* for malloc types */
 
 #define        EVFILT_READ             0
 #define        EVFILT_WRITE            1
@@ -135,6 +134,7 @@
 #define KFILTER_BYNAME         _IOWR('k', 1, struct kfilter_mapping)
 
 #ifdef _KERNEL
+#include <sys/mallocvar.h>             /* for malloc types */
 
 MALLOC_DECLARE(M_KEVENT);
 
diff -r 5f2b3d5792a3 -r 67b13ea2e8e0 sys/sys/malloc.h
--- a/sys/sys/malloc.h  Sun Feb 02 02:21:43 2003 +0000
+++ b/sys/sys/malloc.h  Sun Feb 02 02:22:14 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: malloc.h,v 1.84 2003/02/01 06:23:50 thorpej Exp $      */
+/*     $NetBSD: malloc.h,v 1.85 2003/02/02 02:22:14 christos Exp $     */
 
 /*
  * Copyright (c) 1987, 1993
@@ -45,7 +45,6 @@
 #include "opt_lockdebug.h"
 #endif
 
-#include <sys/mallocvar.h>
 
 /*
  * flags to malloc
@@ -56,6 +55,8 @@
 #define        M_CANFAIL       0x0004  /* can fail if requested memory can't ever
                                 * be allocated */
 #ifdef _KERNEL
+
+#include <sys/mallocvar.h>
 /*
  * The following are standard, built-in malloc types that are
  * not specific to any one subsystem.
diff -r 5f2b3d5792a3 -r 67b13ea2e8e0 sys/sys/savar.h
--- a/sys/sys/savar.h   Sun Feb 02 02:21:43 2003 +0000
+++ b/sys/sys/savar.h   Sun Feb 02 02:22:14 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: savar.h,v 1.3 2003/02/01 06:23:52 thorpej Exp $        */
+/*     $NetBSD: savar.h,v 1.4 2003/02/02 02:22:14 christos Exp $       */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -45,7 +45,6 @@
 
 #include <sys/lock.h>
 #include <sys/queue.h>
-#include <sys/mallocvar.h>
 
 struct sadata_upcall {
        SIMPLEQ_ENTRY(sadata_upcall)    sau_next;
@@ -91,7 +90,11 @@
 extern struct pool sadata_pool;                /* memory pool for sadata structures */
 extern struct pool saupcall_pool;      /* memory pool for pending upcalls */
 
+#ifdef _KERNEL
+#include <sys/mallocvar.h>
+
 MALLOC_DECLARE(M_SA);
+#endif
 
 #define SA_NUMSTACKS   16      /* Number of stacks allocated. XXX */
 



Home | Main Index | Thread Index | Old Index