diff options
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/default_pager.c | 1 | ||||
-rw-r--r-- | sys/vm/device_pager.c | 1 | ||||
-rw-r--r-- | sys/vm/swap_pager.c | 1 | ||||
-rw-r--r-- | sys/vm/vm.h | 45 | ||||
-rw-r--r-- | sys/vm/vm_fault.c | 1 | ||||
-rw-r--r-- | sys/vm/vm_glue.c | 1 | ||||
-rw-r--r-- | sys/vm/vm_inherit.h | 84 | ||||
-rw-r--r-- | sys/vm/vm_init.c | 1 | ||||
-rw-r--r-- | sys/vm/vm_kern.c | 1 | ||||
-rw-r--r-- | sys/vm/vm_map.c | 2 | ||||
-rw-r--r-- | sys/vm/vm_meter.c | 1 | ||||
-rw-r--r-- | sys/vm/vm_mmap.c | 2 | ||||
-rw-r--r-- | sys/vm/vm_object.c | 1 | ||||
-rw-r--r-- | sys/vm/vm_page.c | 1 | ||||
-rw-r--r-- | sys/vm/vm_pageout.c | 1 | ||||
-rw-r--r-- | sys/vm/vm_pager.c | 1 | ||||
-rw-r--r-- | sys/vm/vm_prot.h | 97 | ||||
-rw-r--r-- | sys/vm/vm_unix.c | 1 | ||||
-rw-r--r-- | sys/vm/vm_zone.c | 1 | ||||
-rw-r--r-- | sys/vm/vnode_pager.c | 1 |
20 files changed, 44 insertions, 201 deletions
diff --git a/sys/vm/default_pager.c b/sys/vm/default_pager.c index 91115f4115ac..f587c1e56a73 100644 --- a/sys/vm/default_pager.c +++ b/sys/vm/default_pager.c @@ -45,7 +45,6 @@ #include <sys/vmmeter.h> #include <vm/vm.h> -#include <vm/vm_prot.h> #include <vm/vm_object.h> #include <vm/vm_page.h> #include <vm/vm_pager.h> diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c index d08c14bc5d05..f7b1a87fdec5 100644 --- a/sys/vm/device_pager.c +++ b/sys/vm/device_pager.c @@ -46,7 +46,6 @@ #include <sys/malloc.h> #include <vm/vm.h> -#include <vm/vm_prot.h> #include <vm/vm_object.h> #include <vm/vm_page.h> #include <vm/vm_pager.h> diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 54505fabea32..4807ddf7bd27 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -88,7 +88,6 @@ #include "opt_swap.h" #include <vm/vm.h> -#include <vm/vm_prot.h> #include <vm/vm_object.h> #include <vm/vm_page.h> #include <vm/vm_pager.h> diff --git a/sys/vm/vm.h b/sys/vm/vm.h index 1fd27452dd03..6d6621134ae8 100644 --- a/sys/vm/vm.h +++ b/sys/vm/vm.h @@ -31,15 +31,58 @@ * SUCH DAMAGE. * * @(#)vm.h 8.2 (Berkeley) 12/13/93 + * @(#)vm_prot.h 8.1 (Berkeley) 6/11/93 + * @(#)vm_inherit.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. + * * $FreeBSD$ */ #ifndef VM_H #define VM_H -typedef char vm_inherit_t; /* XXX: inheritance codes */ +typedef char vm_inherit_t; /* inheritance codes */ + +#define VM_INHERIT_SHARE ((vm_inherit_t) 0) +#define VM_INHERIT_COPY ((vm_inherit_t) 1) +#define VM_INHERIT_NONE ((vm_inherit_t) 2) +#define VM_INHERIT_DEFAULT VM_INHERIT_COPY + typedef u_char vm_prot_t; /* protection codes */ +#define VM_PROT_NONE ((vm_prot_t) 0x00) +#define VM_PROT_READ ((vm_prot_t) 0x01) +#define VM_PROT_WRITE ((vm_prot_t) 0x02) +#define VM_PROT_EXECUTE ((vm_prot_t) 0x04) +#define VM_PROT_OVERRIDE_WRITE ((vm_prot_t) 0x08) /* copy-on-write */ + +#define VM_PROT_ALL (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE) +#define VM_PROT_DEFAULT VM_PROT_ALL + union vm_map_object; typedef union vm_map_object vm_map_object_t; diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 091389b105b0..ca1ee1c1f0c3 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -82,7 +82,6 @@ #include <vm/vm.h> #include <vm/vm_param.h> -#include <vm/vm_prot.h> #include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index 1d7157c7450a..5fe78fd8d96b 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -81,7 +81,6 @@ #include <vm/vm.h> #include <vm/vm_param.h> -#include <vm/vm_prot.h> #include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> diff --git a/sys/vm/vm_inherit.h b/sys/vm/vm_inherit.h deleted file mode 100644 index 8d7b7f6df501..000000000000 --- a/sys/vm/vm_inherit.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 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. - * - * from: @(#)vm_inherit.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. - * - * $FreeBSD$ - */ - -/* - * Virtual memory map inheritance definitions. - */ - -#ifndef _VM_INHERIT_ -#define _VM_INHERIT_ - -/* - * Enumeration of valid values for vm_inherit_t. - */ - -#define VM_INHERIT_SHARE ((vm_inherit_t) 0) /* share with child */ -#define VM_INHERIT_COPY ((vm_inherit_t) 1) /* copy into child */ -#define VM_INHERIT_NONE ((vm_inherit_t) 2) /* absent from child */ - -#define VM_INHERIT_DEFAULT VM_INHERIT_COPY - -#endif /* _VM_INHERIT_ */ diff --git a/sys/vm/vm_init.c b/sys/vm/vm_init.c index f7f1df84a199..6357e4546019 100644 --- a/sys/vm/vm_init.c +++ b/sys/vm/vm_init.c @@ -73,7 +73,6 @@ #include <sys/systm.h> #include <vm/vm.h> -#include <vm/vm_prot.h> #include <sys/lock.h> #include <vm/vm_object.h> #include <vm/vm_page.h> diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index 895c5ae5e2ed..9b8584cb3d98 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -75,7 +75,6 @@ #include <vm/vm.h> #include <vm/vm_param.h> -#include <vm/vm_prot.h> #include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index e1a23b36e841..75dcadfc987e 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -79,8 +79,6 @@ #include <vm/vm.h> #include <vm/vm_param.h> -#include <vm/vm_prot.h> -#include <vm/vm_inherit.h> #include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> diff --git a/sys/vm/vm_meter.c b/sys/vm/vm_meter.c index 6c695624bf52..737714fb269b 100644 --- a/sys/vm/vm_meter.c +++ b/sys/vm/vm_meter.c @@ -42,7 +42,6 @@ #include <sys/vmmeter.h> #include <vm/vm.h> -#include <vm/vm_prot.h> #include <vm/vm_page.h> #include <vm/vm_extern.h> #include <vm/vm_param.h> diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 015150810a9c..ce349acb2d49 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -63,8 +63,6 @@ #include <vm/vm.h> #include <vm/vm_param.h> -#include <vm/vm_prot.h> -#include <vm/vm_inherit.h> #include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 999d9bec7828..1df9fafa2dbf 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -78,7 +78,6 @@ #include <vm/vm.h> #include <vm/vm_param.h> -#include <vm/vm_prot.h> #include <vm/pmap.h> #include <vm/vm_map.h> #include <vm/vm_object.h> diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 533ba37fff6f..99a8fefe2501 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -77,7 +77,6 @@ #include <vm/vm.h> #include <vm/vm_param.h> -#include <vm/vm_prot.h> #include <sys/lock.h> #include <vm/vm_kern.h> #include <vm/vm_object.h> diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index d24e51cec6f8..fd5f956d4eb9 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -86,7 +86,6 @@ #include <vm/vm.h> #include <vm/vm_param.h> -#include <vm/vm_prot.h> #include <sys/lock.h> #include <vm/vm_object.h> #include <vm/vm_page.h> diff --git a/sys/vm/vm_pager.c b/sys/vm/vm_pager.c index a9e1c7e93283..1bef6df45a62 100644 --- a/sys/vm/vm_pager.c +++ b/sys/vm/vm_pager.c @@ -80,7 +80,6 @@ #include <vm/vm.h> #include <vm/vm_param.h> -#include <vm/vm_prot.h> #include <vm/vm_object.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 68e552e018ad..000000000000 --- a/sys/vm/vm_prot.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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. - * - * from: @(#)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. - * - * $FreeBSD$ - */ - -/* - * Virtual memory protection definitions. - */ - -#ifndef _VM_PROT_ -#define _VM_PROT_ - -/* - * 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 */ -#define VM_PROT_OVERRIDE_WRITE ((vm_prot_t) 0x08) /* write, overriding permission for COW */ - -/* - * 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_ */ diff --git a/sys/vm/vm_unix.c b/sys/vm/vm_unix.c index f81101b2e78a..7c5c924208f0 100644 --- a/sys/vm/vm_unix.c +++ b/sys/vm/vm_unix.c @@ -55,7 +55,6 @@ #include <vm/pmap.h> #include <vm/vm_map.h> #include <vm/swap_pager.h> -#include <vm/vm_prot.h> #ifndef _SYS_SYSPROTO_H_ struct obreak_args { diff --git a/sys/vm/vm_zone.c b/sys/vm/vm_zone.c index dab39a7ede96..e111b835a93b 100644 --- a/sys/vm/vm_zone.c +++ b/sys/vm/vm_zone.c @@ -24,7 +24,6 @@ #include <vm/vm.h> #include <vm/vm_object.h> -#include <vm/vm_prot.h> #include <vm/vm_page.h> #include <vm/vm_map.h> #include <vm/vm_kern.h> diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index cc7cd4bec794..1ccc69282849 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -61,7 +61,6 @@ #include <sys/conf.h> #include <vm/vm.h> -#include <vm/vm_prot.h> #include <vm/vm_object.h> #include <vm/vm_page.h> #include <vm/vm_pager.h> |