summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2001-08-12 05:18:43 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2001-08-12 05:18:43 +0000
commitca77cc963b66a482374ac7cd83dd7aafd15f56f6 (patch)
tree87ff834e089303a2c4c8395e4596906a70bb391f
parenta75a6f8ff3fb15b2d7ee889f933212fdaee2f5b2 (diff)
vm/vm_prot.h no more
-rw-r--r--sys/sys/vnode.h8
-rw-r--r--sys/uvm/uvm_extern.h31
-rw-r--r--sys/vm/vm.h5
-rw-r--r--sys/vm/vm_prot.h105
4 files changed, 38 insertions, 111 deletions
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index f1866ed6003..cdb5e13753e 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnode.h,v 1.37 2001/08/06 14:03:04 art Exp $ */
+/* $OpenBSD: vnode.h,v 1.38 2001/08/12 05:18:42 mickey Exp $ */
/* $NetBSD: vnode.h,v 1.38 1996/02/29 20:59:05 cgd Exp $ */
/*
@@ -36,15 +36,17 @@
* @(#)vnode.h 8.11 (Berkeley) 11/21/94
*/
+#include <sys/types.h>
#include <sys/queue.h>
#include <sys/lock.h>
#include <sys/select.h>
/* XXX: clean up includes later */
#include <vm/pglist.h> /* XXX */
-#include <vm/vm_param.h> /* XXX */
-#include <vm/vm.h> /* XXX */
#include <sys/lock.h> /* XXX */
+#include <vm/vm.h> /* XXX */
+#include <uvm/uvm.h> /* XXX */
+#include <uvm/uvm_extern.h> /* XXX */
#include <uvm/uvm_object.h> /* XXX */
#include <uvm/uvm_vnode.h> /* XXX */
diff --git a/sys/uvm/uvm_extern.h b/sys/uvm/uvm_extern.h
index 209e182cdae..b66f85b4c3c 100644
--- a/sys/uvm/uvm_extern.h
+++ b/sys/uvm/uvm_extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_extern.h,v 1.19 2001/08/11 10:57:22 art Exp $ */
+/* $OpenBSD: uvm_extern.h,v 1.20 2001/08/12 05:18:41 mickey Exp $ */
/* $NetBSD: uvm_extern.h,v 1.42 2000/06/08 05:52:34 thorpej Exp $ */
/*
@@ -88,6 +88,35 @@
/* bits 0x700: max protection, 0x800: not used */
/* bits 0x7000: advice, 0x8000: not used */
+
+typedef int vm_prot_t;
+
+/*
+ * Protection values, defined as bits within the vm_prot_t type
+ *
+ * These are funky definitions from old CMU VM and are kept
+ * for compatibility reasons, one day they are going to die,
+ * just like everybody else.
+ */
+
+#define VM_PROT_NONE ((vm_prot_t) 0x00)
+
+#define VM_PROT_READ ((vm_prot_t) 0x01) /* read permission */
+#define VM_PROT_WRITE ((vm_prot_t) 0x02) /* write permission */
+#define VM_PROT_EXECUTE ((vm_prot_t) 0x04) /* execute permission */
+
+/*
+ * The default protection for newly-created virtual memory
+ */
+
+#define VM_PROT_DEFAULT (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE)
+
+/*
+ * The maximum privileges possible, for parameter checking.
+ */
+
+#define VM_PROT_ALL (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE)
+
/* advice: matches MADV_* from sys/mman.h */
#define UVM_ADV_NORMAL 0x0 /* 'normal' */
#define UVM_ADV_RANDOM 0x1 /* 'random' */
diff --git a/sys/vm/vm.h b/sys/vm/vm.h
index b953a9c26b5..cde7a9ebd8c 100644
--- a/sys/vm/vm.h
+++ b/sys/vm/vm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm.h,v 1.15 2001/08/06 14:03:05 art Exp $ */
+/* $OpenBSD: vm.h,v 1.16 2001/08/12 05:18:42 mickey Exp $ */
/* $NetBSD: vm.h,v 1.22 2000/03/26 20:54:48 kleink Exp $ */
/*
@@ -54,12 +54,13 @@ typedef struct vm_map *vm_map_t;
struct vm_page;
typedef struct vm_page *vm_page_t;
+#include <sys/types.h>
#include <sys/vmmeter.h>
#include <sys/queue.h>
#include <vm/vm_param.h>
#include <sys/lock.h>
-#include <vm/vm_prot.h>
#include <vm/vm_inherit.h>
+#include <uvm/uvm_extern.h>
#include <vm/vm_map.h>
#include <vm/vm_page.h>
#include <vm/vm_pager.h>
diff --git a/sys/vm/vm_prot.h b/sys/vm/vm_prot.h
deleted file mode 100644
index 3fc95e54a2c..00000000000
--- a/sys/vm/vm_prot.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* $OpenBSD: vm_prot.h,v 1.2 1996/08/02 00:06:05 niklas Exp $ */
-/* $NetBSD: vm_prot.h,v 1.6 1994/06/29 06:48:42 cgd Exp $ */
-
-/*
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * The Mach Operating System project at Carnegie-Mellon University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)vm_prot.h 8.1 (Berkeley) 6/11/93
- *
- *
- * Copyright (c) 1987, 1990 Carnegie-Mellon University.
- * All rights reserved.
- *
- * Authors: Avadis Tevanian, Jr., Michael Wayne Young
- *
- * Permission to use, copy, modify and distribute this software and
- * its documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- */
-
-/*
- * Virtual memory protection definitions.
- */
-
-#ifndef _VM_PROT_
-#define _VM_PROT_
-
-/*
- * Types defined:
- *
- * vm_prot_t VM protection values.
- */
-
-typedef int vm_prot_t;
-
-/*
- * Protection values, defined as bits within the vm_prot_t type
- */
-
-#define VM_PROT_NONE ((vm_prot_t) 0x00)
-
-#define VM_PROT_READ ((vm_prot_t) 0x01) /* read permission */
-#define VM_PROT_WRITE ((vm_prot_t) 0x02) /* write permission */
-#define VM_PROT_EXECUTE ((vm_prot_t) 0x04) /* execute permission */
-
-/*
- * The default protection for newly-created virtual memory
- */
-
-#define VM_PROT_DEFAULT (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE)
-
-/*
- * The maximum privileges possible, for parameter checking.
- */
-
-#define VM_PROT_ALL (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE)
-
-#endif /* _VM_PROT_ */