xref: /original-bsd/sys/vm/vm_prot.h (revision 4d1ce0b0)
1 /*
2  * Copyright (c) 1985, Avadis Tevanian, Jr., Michael Wayne Young
3  * Copyright (c) 1987 Carnegie-Mellon University
4  * Copyright (c) 1991 Regents of the University of California.
5  * All rights reserved.
6  *
7  * This code is derived from software contributed to Berkeley by
8  * The Mach Operating System project at Carnegie-Mellon University.
9  *
10  * The CMU software License Agreement specifies the terms and conditions
11  * for use and redistribution.
12  *
13  *	@(#)vm_prot.h	7.1 (Berkeley) 12/05/90
14  */
15 
16 /*
17  *	Virtual memory protection definitions.
18  */
19 
20 #ifndef	_VM_PROT_
21 #define	_VM_PROT_
22 
23 /*
24  *	Types defined:
25  *
26  *	vm_prot_t		VM protection values.
27  */
28 
29 typedef int		vm_prot_t;
30 
31 /*
32  *	Protection values, defined as bits within the vm_prot_t type
33  */
34 
35 #define	VM_PROT_NONE	((vm_prot_t) 0x00)
36 
37 #define VM_PROT_READ	((vm_prot_t) 0x01)	/* read permission */
38 #define VM_PROT_WRITE	((vm_prot_t) 0x02)	/* write permission */
39 #define VM_PROT_EXECUTE	((vm_prot_t) 0x04)	/* execute permission */
40 
41 /*
42  *	The default protection for newly-created virtual memory
43  */
44 
45 #define VM_PROT_DEFAULT	(VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE)
46 
47 /*
48  *	The maximum privileges possible, for parameter checking.
49  */
50 
51 #define VM_PROT_ALL	(VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE)
52 
53 #endif	_VM_PROT_
54