summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsmart <smart@openbsd.org>2001-03-09 05:34:38 +0000
committersmart <smart@openbsd.org>2001-03-09 05:34:38 +0000
commitab87c361e44b5e7ad7907069f79026c48aeb6ef5 (patch)
tree32ab5f825fedc1590c1606fdc5ded5c3cc7ce332
parentexit(-#) is wrong (diff)
downloadwireguard-openbsd-ab87c361e44b5e7ad7907069f79026c48aeb6ef5.tar.xz
wireguard-openbsd-ab87c361e44b5e7ad7907069f79026c48aeb6ef5.zip
Protect protypes, certain macros, and inlines from userland. Checked userland
with a 'make build'. From NetBSD. art@ ok
-rw-r--r--sys/uvm/uvm.h10
-rw-r--r--sys/uvm/uvm_amap.h10
-rw-r--r--sys/uvm/uvm_anon.h8
-rw-r--r--sys/uvm/uvm_aobj.h8
-rw-r--r--sys/uvm/uvm_ddb.h15
-rw-r--r--sys/uvm/uvm_device.h8
-rw-r--r--sys/uvm/uvm_extern.h10
-rw-r--r--sys/uvm/uvm_fault.h6
-rw-r--r--sys/uvm/uvm_glue.h8
-rw-r--r--sys/uvm/uvm_km.h8
-rw-r--r--sys/uvm/uvm_loan.h8
-rw-r--r--sys/uvm/uvm_map.h8
-rw-r--r--sys/uvm/uvm_page.h8
-rw-r--r--sys/uvm/uvm_pager.h7
-rw-r--r--sys/uvm/uvm_pdaemon.h8
-rw-r--r--sys/uvm/uvm_stat.h11
-rw-r--r--sys/uvm/uvm_swap.h9
-rw-r--r--sys/uvm/uvm_vnode.h7
18 files changed, 119 insertions, 38 deletions
diff --git a/sys/uvm/uvm.h b/sys/uvm/uvm.h
index b573aee9ac9..22f026f92e5 100644
--- a/sys/uvm/uvm.h
+++ b/sys/uvm/uvm.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: uvm.h,v 1.6 2001/01/29 02:07:41 niklas Exp $ */
-/* $NetBSD: uvm.h,v 1.15 1999/03/26 17:34:15 chs Exp $ */
+/* $OpenBSD: uvm.h,v 1.7 2001/03/09 05:34:38 smart Exp $ */
+/* $NetBSD: uvm.h,v 1.16 1999/06/21 17:25:11 thorpej Exp $ */
/*
*
@@ -119,8 +119,10 @@ extern struct uvm uvm;
* historys
*/
+#ifdef _KERNEL
UVMHIST_DECL(maphist);
UVMHIST_DECL(pdhist);
+#endif /* _KERNEL */
/*
* vm_map_entry etype bits:
@@ -140,6 +142,8 @@ UVMHIST_DECL(pdhist);
* macros
*/
+#ifdef _KERNEL
+
/*
* UVM_UNLOCK_AND_WAIT: atomic unlock+wait... front end for the
* (poorly named) thread_sleep_msg function.
@@ -181,4 +185,6 @@ UVMHIST_DECL(pdhist);
#include <uvm/uvm_page_i.h>
#include <uvm/uvm_pager_i.h>
+#endif /* _KERNEL */
+
#endif /* _UVM_UVM_H_ */
diff --git a/sys/uvm/uvm_amap.h b/sys/uvm/uvm_amap.h
index c76be958efe..495da2488ac 100644
--- a/sys/uvm/uvm_amap.h
+++ b/sys/uvm/uvm_amap.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: uvm_amap.h,v 1.4 2001/01/29 02:07:42 niklas Exp $ */
-/* $NetBSD: uvm_amap.h,v 1.10 1999/01/28 14:46:27 chuck Exp $ */
+/* $OpenBSD: uvm_amap.h,v 1.5 2001/03/09 05:34:38 smart Exp $ */
+/* $NetBSD: uvm_amap.h,v 1.11 1999/06/21 17:25:11 thorpej Exp $ */
/*
*
@@ -51,6 +51,8 @@
* amap implementation-specific definitions.
*/
+#ifdef _KERNEL
+
/*
* part 1: amap interface
*/
@@ -135,6 +137,7 @@ void amap_wipeout /* remove all anons from amap */
#define AMAP_SHARED 0x1 /* amap is shared */
#define AMAP_REFALL 0x2 /* amap_ref: reference entire amap */
+#endif /* _KERNEL */
/**********************************************************************/
@@ -238,6 +241,7 @@ struct vm_amap {
#define UVM_AMAP_LARGE 256 /* # of slots in "large" amap */
#define UVM_AMAP_CHUNK 16 /* # of slots to chunk large amaps in */
+#ifdef _KERNEL
/*
* macros
@@ -280,4 +284,6 @@ void amap_wiperange /* wipe part of an amap */
__P((struct vm_amap *, int, int));
#endif /* UVM_AMAP_PPREF */
+#endif /* _KERNEL */
+
#endif /* _UVM_UVM_AMAP_H_ */
diff --git a/sys/uvm/uvm_anon.h b/sys/uvm/uvm_anon.h
index 4fdfa246175..e4ef0b57561 100644
--- a/sys/uvm/uvm_anon.h
+++ b/sys/uvm/uvm_anon.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: uvm_anon.h,v 1.5 2001/01/29 02:07:42 niklas Exp $ */
-/* $NetBSD: uvm_anon.h,v 1.10 1999/03/26 17:34:15 chs Exp $ */
+/* $OpenBSD: uvm_anon.h,v 1.6 2001/03/09 05:34:38 smart Exp $ */
+/* $NetBSD: uvm_anon.h,v 1.11 1999/06/21 17:25:11 thorpej Exp $ */
/*
*
@@ -93,6 +93,8 @@ struct vm_aref {
* locked by vm_map lock.
*/
+#ifdef _KERNEL
+
/*
* prototypes
*/
@@ -104,4 +106,6 @@ void uvm_anon_add __P((int));
struct vm_page *uvm_anon_lockloanpg __P((struct vm_anon *));
void uvm_anon_dropswap __P((struct vm_anon *));
+#endif /* _KERNEL */
+
#endif /* _UVM_UVM_ANON_H_ */
diff --git a/sys/uvm/uvm_aobj.h b/sys/uvm/uvm_aobj.h
index d82d2d85e69..e9db0c97a5e 100644
--- a/sys/uvm/uvm_aobj.h
+++ b/sys/uvm/uvm_aobj.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: uvm_aobj.h,v 1.5 2001/01/29 02:07:43 niklas Exp $ */
-/* $NetBSD: uvm_aobj.h,v 1.8 1999/03/26 17:34:15 chs Exp $ */
+/* $OpenBSD: uvm_aobj.h,v 1.6 2001/03/09 05:34:38 smart Exp $ */
+/* $NetBSD: uvm_aobj.h,v 1.9 1999/06/21 17:25:11 thorpej Exp $ */
/*
* Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and
@@ -59,6 +59,8 @@
* page is no longer PG_BUSY ... */
#define UAO_FLAG_NOSWAP 0x8 /* aobj can't swap (kernel obj only!) */
+#ifdef _KERNEL
+
/*
* prototypes
*/
@@ -72,4 +74,6 @@ void uao_dropswap __P((struct uvm_object *, int));
extern struct uvm_pagerops aobj_pager;
+#endif /* _KERNEL */
+
#endif /* _UVM_UVM_AOBJ_H_ */
diff --git a/sys/uvm/uvm_ddb.h b/sys/uvm/uvm_ddb.h
index ff8acc9506c..43d6d7be22a 100644
--- a/sys/uvm/uvm_ddb.h
+++ b/sys/uvm/uvm_ddb.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: uvm_ddb.h,v 1.5 2001/01/29 02:07:43 niklas Exp $ */
-/* $NetBSD: uvm_ddb.h,v 1.2 1999/03/25 18:48:50 mrg Exp $ */
+/* $OpenBSD: uvm_ddb.h,v 1.6 2001/03/09 05:34:38 smart Exp $ */
+/* $NetBSD: uvm_ddb.h,v 1.3 1999/06/21 17:25:11 thorpej Exp $ */
/*
*
@@ -38,7 +38,9 @@
#ifndef _UVM_UVM_DDB_H_
#define _UVM_UVM_DDB_H_
-#if defined(DDB)
+#ifdef _KERNEL
+
+#ifdef DDB
void uvm_map_print __P((vm_map_t, boolean_t));
void uvm_map_printit __P((vm_map_t, boolean_t,
int (*) __P((const char *, ...))));
@@ -49,5 +51,8 @@ void uvm_object_printit __P((struct uvm_object *, boolean_t,
void uvm_page_print __P((struct vm_page *, boolean_t));
void uvm_page_printit __P((struct vm_page *, boolean_t,
int (*) __P((const char *, ...))));
-#endif
-#endif _UVM_UVM_DDB_H_
+#endif /* DDB */
+
+#endif /* _KERNEL */
+
+#endif /* _UVM_UVM_DDB_H_ */
diff --git a/sys/uvm/uvm_device.h b/sys/uvm/uvm_device.h
index 88d0480424b..af56a7d4eaa 100644
--- a/sys/uvm/uvm_device.h
+++ b/sys/uvm/uvm_device.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: uvm_device.h,v 1.5 2001/01/29 02:07:43 niklas Exp $ */
-/* $NetBSD: uvm_device.h,v 1.7 1999/03/25 18:48:50 mrg Exp $ */
+/* $OpenBSD: uvm_device.h,v 1.6 2001/03/09 05:34:38 smart Exp $ */
+/* $NetBSD: uvm_device.h,v 1.8 1999/06/21 17:25:11 thorpej Exp $ */
/*
*
@@ -64,10 +64,14 @@ struct uvm_device {
#define UVM_DEVICE_HOLD 0x1 /* someone has a "hold" on it */
#define UVM_DEVICE_WANTED 0x2 /* someone wants to put a "hold" on */
+#ifdef _KERNEL
+
/*
* prototypes
*/
struct uvm_object *udv_attach __P((void *, vm_prot_t, vaddr_t, vsize_t));
+#endif /* _KERNEL */
+
#endif /* _UVM_UVM_DEVICE_H_ */
diff --git a/sys/uvm/uvm_extern.h b/sys/uvm/uvm_extern.h
index 03f727e2047..742d3e63732 100644
--- a/sys/uvm/uvm_extern.h
+++ b/sys/uvm/uvm_extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_extern.h,v 1.8 2001/01/29 02:07:43 niklas Exp $ */
+/* $OpenBSD: uvm_extern.h,v 1.9 2001/03/09 05:34:38 smart Exp $ */
/* $NetBSD: uvm_extern.h,v 1.27 1999/05/26 19:16:36 thorpej Exp $ */
/*
@@ -243,6 +243,7 @@ struct uvmexp {
struct uvm_object *mb_object;
};
+#ifdef _KERNEL
extern struct uvmexp uvmexp;
@@ -254,6 +255,8 @@ extern struct uvmexp uvmexp;
#define uvm_km_zalloc(MAP,SIZE) uvm_km_alloc1(MAP,SIZE,TRUE)
#define uvm_km_alloc(MAP,SIZE) uvm_km_alloc1(MAP,SIZE,FALSE)
+#endif /* _KERNEL */
+
/*
* typedefs
*/
@@ -261,6 +264,8 @@ extern struct uvmexp uvmexp;
typedef unsigned int uvm_flag_t;
typedef int vm_fault_t;
+#ifdef _KERNEL
+
/* uvm_aobj.c */
struct uvm_object *uao_create __P((vsize_t, int));
void uao_detach __P((struct uvm_object *));
@@ -389,5 +394,6 @@ void uvm_vnp_terminate __P((struct vnode *));
boolean_t uvm_vnp_uncache __P((struct vnode *));
struct uvm_object *uvn_attach __P((void *, vm_prot_t));
-#endif /* _UVM_UVM_EXTERN_H_ */
+#endif /* _KERNEL */
+#endif /* _UVM_UVM_EXTERN_H_ */
diff --git a/sys/uvm/uvm_fault.h b/sys/uvm/uvm_fault.h
index 8dd86764f60..d77f23f098a 100644
--- a/sys/uvm/uvm_fault.h
+++ b/sys/uvm/uvm_fault.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_fault.h,v 1.5 2001/01/29 02:07:44 niklas Exp $ */
+/* $OpenBSD: uvm_fault.h,v 1.6 2001/03/09 05:34:38 smart Exp $ */
/* $NetBSD: uvm_fault.h,v 1.11 1999/06/04 23:38:41 thorpej Exp $ */
/*
@@ -66,6 +66,8 @@ struct uvm_faultinfo {
vsize_t size; /* size of interest */
};
+#ifdef _KERNEL
+
/*
* fault prototypes
*/
@@ -83,4 +85,6 @@ static void uvmfault_unlockmaps __P((struct uvm_faultinfo *, boolean_t));
int uvm_fault_wire __P((vm_map_t, vaddr_t, vaddr_t, vm_prot_t));
void uvm_fault_unwire __P((vm_map_t, vaddr_t, vaddr_t));
+#endif /* _KERNEL */
+
#endif /* _UVM_UVM_FAULT_H_ */
diff --git a/sys/uvm/uvm_glue.h b/sys/uvm/uvm_glue.h
index d92635d8295..4983b4d82c4 100644
--- a/sys/uvm/uvm_glue.h
+++ b/sys/uvm/uvm_glue.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: uvm_glue.h,v 1.5 2001/01/29 02:07:44 niklas Exp $ */
-/* $NetBSD: uvm_glue.h,v 1.5 1999/03/25 18:48:51 mrg Exp $ */
+/* $OpenBSD: uvm_glue.h,v 1.6 2001/03/09 05:34:38 smart Exp $ */
+/* $NetBSD: uvm_glue.h,v 1.6 1999/06/21 17:25:11 thorpej Exp $ */
/*
*
@@ -38,10 +38,14 @@
#ifndef _UVM_UVM_GLUE_H_
#define _UVM_UVM_GLUE_H_
+#ifdef _KERNEL
+
/*
* uvm_glue.h
*/
void uvm_swapout_threads __P((void));
+#endif /* _KERNEL */
+
#endif /* _UVM_UVM_GLUE_H_ */
diff --git a/sys/uvm/uvm_km.h b/sys/uvm/uvm_km.h
index e73e9b9e5c5..2ad556da2a6 100644
--- a/sys/uvm/uvm_km.h
+++ b/sys/uvm/uvm_km.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: uvm_km.h,v 1.5 2001/01/29 02:07:45 niklas Exp $ */
-/* $NetBSD: uvm_km.h,v 1.8 1999/05/25 20:30:09 thorpej Exp $ */
+/* $OpenBSD: uvm_km.h,v 1.6 2001/03/09 05:34:38 smart Exp $ */
+/* $NetBSD: uvm_km.h,v 1.9 1999/06/21 17:25:11 thorpej Exp $ */
/*
*
@@ -42,6 +42,8 @@
* uvm_km.h
*/
+#ifdef _KERNEL
+
/*
* prototypes
*/
@@ -50,4 +52,6 @@ void uvm_km_init __P((vaddr_t, vaddr_t));
void uvm_km_pgremove __P((struct uvm_object *, vaddr_t, vaddr_t));
void uvm_km_pgremove_intrsafe __P((struct uvm_object *, vaddr_t, vaddr_t));
+#endif /* _KERNEL */
+
#endif /* _UVM_UVM_KM_H_ */
diff --git a/sys/uvm/uvm_loan.h b/sys/uvm/uvm_loan.h
index a0e55c49e27..540133cfc95 100644
--- a/sys/uvm/uvm_loan.h
+++ b/sys/uvm/uvm_loan.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: uvm_loan.h,v 1.5 2001/01/29 02:07:45 niklas Exp $ */
-/* $NetBSD: uvm_loan.h,v 1.6 1999/03/25 18:48:52 mrg Exp $ */
+/* $OpenBSD: uvm_loan.h,v 1.6 2001/03/09 05:34:38 smart Exp $ */
+/* $NetBSD: uvm_loan.h,v 1.7 1999/06/21 17:25:11 thorpej Exp $ */
/*
*
@@ -38,6 +38,8 @@
#ifndef _UVM_UVM_LOAN_H_
#define _UVM_UVM_LOAN_H_
+#ifdef _KERNEL
+
/*
* flags for uvm_loan
*/
@@ -53,4 +55,6 @@ int uvm_loan __P((struct vm_map *, vaddr_t, vsize_t, void **, int));
void uvm_unloananon __P((struct vm_anon **, int));
void uvm_unloanpage __P((struct vm_page **, int));
+#endif /* _KERNEL */
+
#endif /* _UVM_UVM_LOAN_H_ */
diff --git a/sys/uvm/uvm_map.h b/sys/uvm/uvm_map.h
index 3cdf850ae3e..c222c2b6039 100644
--- a/sys/uvm/uvm_map.h
+++ b/sys/uvm/uvm_map.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: uvm_map.h,v 1.5 2001/01/29 02:07:46 niklas Exp $ */
-/* $NetBSD: uvm_map.h,v 1.14 1999/05/26 19:16:36 thorpej Exp $ */
+/* $OpenBSD: uvm_map.h,v 1.6 2001/03/09 05:34:38 smart Exp $ */
+/* $NetBSD: uvm_map.h,v 1.15 1999/06/21 17:25:11 thorpej Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -74,6 +74,8 @@
* uvm_map.h
*/
+#ifdef _KERNEL
+
/*
* macros
*/
@@ -169,4 +171,6 @@ int uvm_unmap_remove __P((vm_map_t, vaddr_t, vaddr_t,
struct vmspace *uvmspace_fork __P((struct vmspace *));
+#endif /* _KERNEL */
+
#endif /* _UVM_UVM_MAP_H_ */
diff --git a/sys/uvm/uvm_page.h b/sys/uvm/uvm_page.h
index 74114eee208..d5bbb726820 100644
--- a/sys/uvm/uvm_page.h
+++ b/sys/uvm/uvm_page.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: uvm_page.h,v 1.5 2001/01/29 02:07:47 niklas Exp $ */
-/* $NetBSD: uvm_page.h,v 1.12 1999/05/24 19:10:57 thorpej Exp $ */
+/* $OpenBSD: uvm_page.h,v 1.6 2001/03/09 05:34:38 smart Exp $ */
+/* $NetBSD: uvm_page.h,v 1.13 1999/06/21 17:25:12 thorpej Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -74,6 +74,8 @@
* uvm_page.h
*/
+#ifdef _KERNEL
+
/*
* macros
*/
@@ -127,4 +129,6 @@ PAGE_INLINE void uvm_pagezero __P((struct vm_page *));
PAGE_INLINE int uvm_page_lookup_freelist __P((struct vm_page *));
+#endif /* _KERNEL */
+
#endif /* _UVM_UVM_PAGE_H_ */
diff --git a/sys/uvm/uvm_pager.h b/sys/uvm/uvm_pager.h
index 6106d01f246..2cc33ba0e34 100644
--- a/sys/uvm/uvm_pager.h
+++ b/sys/uvm/uvm_pager.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: uvm_pager.h,v 1.5 2001/01/29 02:07:48 niklas Exp $ */
-/* $NetBSD: uvm_pager.h,v 1.9 1999/03/25 18:48:55 mrg Exp $ */
+/* $OpenBSD: uvm_pager.h,v 1.6 2001/03/09 05:34:38 smart Exp $ */
+/* $NetBSD: uvm_pager.h,v 1.10 1999/06/21 17:25:12 thorpej Exp $ */
/*
*
@@ -117,6 +117,8 @@ struct uvm_pagerops {
/* page we are not interested in getting */
#define PGO_DONTCARE ((struct vm_page *) -1) /* [get only] */
+#ifdef _KERNEL
+
/*
* handle inline options
*/
@@ -149,5 +151,6 @@ struct vm_page **uvm_mk_pcluster __P((struct uvm_object *, struct vm_page **,
vaddr_t, vaddr_t));
void uvm_shareprot __P((vm_map_entry_t, vm_prot_t));
+#endif /* _KERNEL */
#endif /* _UVM_UVM_PAGER_H_ */
diff --git a/sys/uvm/uvm_pdaemon.h b/sys/uvm/uvm_pdaemon.h
index 50ac09f5512..93992f53450 100644
--- a/sys/uvm/uvm_pdaemon.h
+++ b/sys/uvm/uvm_pdaemon.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: uvm_pdaemon.h,v 1.5 2001/01/29 02:07:48 niklas Exp $ */
-/* $NetBSD: uvm_pdaemon.h,v 1.6 1999/03/25 18:48:56 mrg Exp $ */
+/* $OpenBSD: uvm_pdaemon.h,v 1.6 2001/03/09 05:34:38 smart Exp $ */
+/* $NetBSD: uvm_pdaemon.h,v 1.7 1999/06/21 17:25:12 thorpej Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -74,10 +74,14 @@
* uvm_pdaemon.h: page daemon hooks
*/
+#ifdef _KERNEL
+
/*
* prototypes
*/
void uvm_wait __P((char *));
+#endif /* _KERNEL */
+
#endif /* _UVM_UVM_PDAEMON_H_ */
diff --git a/sys/uvm/uvm_stat.h b/sys/uvm/uvm_stat.h
index d2abc3efef6..6706895d0c8 100644
--- a/sys/uvm/uvm_stat.h
+++ b/sys/uvm/uvm_stat.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: uvm_stat.h,v 1.6 2001/01/29 02:07:49 niklas Exp $ */
-/* $NetBSD: uvm_stat.h,v 1.14 1999/03/25 18:48:56 mrg Exp $ */
+/* $OpenBSD: uvm_stat.h,v 1.7 2001/03/09 05:34:38 smart Exp $ */
+/* $NetBSD: uvm_stat.h,v 1.15 1999/06/21 17:25:12 thorpej Exp $ */
/*
*
@@ -60,6 +60,8 @@ struct uvm_cnt {
void *p; /* private data */
};
+#ifdef _KERNEL
+
extern struct uvm_cnt *uvm_cnt_head;
/*
@@ -89,6 +91,7 @@ do { \
#define UVMCNT_INCR(C) UVMCNT_ADD(C,1)
#define UVMCNT_DECR(C) UVMCNT_ADD(C,-1)
+#endif /* _KERNEL */
/*
* history/tracing
@@ -129,6 +132,8 @@ LIST_HEAD(uvm_history_head, uvm_history);
#define UVMHIST_MAPHIST 0x00000001 /* maphist */
#define UVMHIST_PDHIST 0x00000002 /* pdhist */
+#ifdef _KERNEL
+
/*
* macros to use the history/tracing code. note that UVMHIST_LOG
* must take 4 arguments (even if they are ignored by the format).
@@ -239,4 +244,6 @@ uvmhist_print(e)
}
#endif /* UVMHIST */
+#endif /* _KERNEL */
+
#endif /* _UVM_UVM_STAT_H_ */
diff --git a/sys/uvm/uvm_swap.h b/sys/uvm/uvm_swap.h
index f1e55fb3219..3438d15d7e3 100644
--- a/sys/uvm/uvm_swap.h
+++ b/sys/uvm/uvm_swap.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: uvm_swap.h,v 1.5 2001/01/29 02:07:49 niklas Exp $ */
-/* $NetBSD: uvm_swap.h,v 1.3 1998/02/07 11:09:48 mrg Exp $ */
+/* $OpenBSD: uvm_swap.h,v 1.6 2001/03/09 05:34:38 smart Exp $ */
+/* $NetBSD: uvm_swap.h,v 1.4 1999/06/21 17:25:12 thorpej Exp $ */
/*
* Copyright (c) 1997 Matthew R. Green
@@ -34,6 +34,8 @@
#ifndef _UVM_UVM_SWAP_H_
#define _UVM_UVM_SWAP_H_
+#ifdef _KERNEL
+
int uvm_swap_get __P((struct vm_page *, int, int));
int uvm_swap_put __P((int, struct vm_page **, int,
int));
@@ -43,4 +45,7 @@ void uvm_swap_free __P((int startslot, int nslots));
#ifdef UVM_SWAP_ENCRYPT
void uvm_swap_initcrypt_all __P((void));
#endif
+
+#endif /* _KERNEL */
+
#endif /* _UVM_UVM_SWAP_H_ */
diff --git a/sys/uvm/uvm_vnode.h b/sys/uvm/uvm_vnode.h
index 8b552d95bef..644ce8ee6a8 100644
--- a/sys/uvm/uvm_vnode.h
+++ b/sys/uvm/uvm_vnode.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: uvm_vnode.h,v 1.5 2001/01/29 02:07:52 niklas Exp $ */
-/* $NetBSD: uvm_vnode.h,v 1.7 1999/03/25 18:48:56 mrg Exp $ */
+/* $OpenBSD: uvm_vnode.h,v 1.6 2001/03/09 05:34:38 smart Exp $ */
+/* $NetBSD: uvm_vnode.h,v 1.8 1999/06/21 17:25:12 thorpej Exp $ */
/*
*
@@ -90,6 +90,7 @@ struct uvm_vnode {
*/
#define UVM_VNODE_BLOCKED (UVM_VNODE_ALOCK|UVM_VNODE_DYING|UVM_VNODE_RELKILL)
+#ifdef _KERNEL
/*
* prototypes
@@ -104,4 +105,6 @@ struct uvm_vnode {
struct uvm_object *uvn_attach __P((void *, vm_prot_t));
#endif
+#endif /* _KERNEL */
+
#endif /* _UVM_UVM_VNODE_H_ */