1 /* 2 * Copyright (c) 1991 Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * The Mach Operating System project at Carnegie-Mellon University. 7 * 8 * %sccs.include.redist.c% 9 * 10 * @(#)vm_prot.h 7.2 (Berkeley) 04/21/91 11 * 12 * 13 * Copyright (c) 1987, 1990 Carnegie-Mellon University. 14 * All rights reserved. 15 * 16 * Authors: Avadis Tevanian, Jr., Michael Wayne Young 17 * 18 * Permission to use, copy, modify and distribute this software and 19 * its documentation is hereby granted, provided that both the copyright 20 * notice and this permission notice appear in all copies of the 21 * software, derivative works or modified versions, and any portions 22 * thereof, and that both notices appear in supporting documentation. 23 * 24 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 25 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 26 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 27 * 28 * Carnegie Mellon requests users of this software to return to 29 * 30 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 31 * School of Computer Science 32 * Carnegie Mellon University 33 * Pittsburgh PA 15213-3890 34 * 35 * any improvements or extensions that they make and grant Carnegie the 36 * rights to redistribute these changes. 37 */ 38 39 /* 40 * Virtual memory protection definitions. 41 */ 42 43 #ifndef _VM_PROT_ 44 #define _VM_PROT_ 45 46 /* 47 * Types defined: 48 * 49 * vm_prot_t VM protection values. 50 */ 51 52 typedef int vm_prot_t; 53 54 /* 55 * Protection values, defined as bits within the vm_prot_t type 56 */ 57 58 #define VM_PROT_NONE ((vm_prot_t) 0x00) 59 60 #define VM_PROT_READ ((vm_prot_t) 0x01) /* read permission */ 61 #define VM_PROT_WRITE ((vm_prot_t) 0x02) /* write permission */ 62 #define VM_PROT_EXECUTE ((vm_prot_t) 0x04) /* execute permission */ 63 64 /* 65 * The default protection for newly-created virtual memory 66 */ 67 68 #define VM_PROT_DEFAULT (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE) 69 70 /* 71 * The maximum privileges possible, for parameter checking. 72 */ 73 74 #define VM_PROT_ALL (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE) 75 76 #endif _VM_PROT_ 77