xref: /original-bsd/sys/vm/vm_prot.h (revision 69dd407e)
1e12e63a7Smckusick /*
2*69dd407eSbostic  * Copyright (c) 1991, 1993
3*69dd407eSbostic  *	The Regents of the University of California.  All rights reserved.
4e12e63a7Smckusick  *
5e12e63a7Smckusick  * This code is derived from software contributed to Berkeley by
6e12e63a7Smckusick  * The Mach Operating System project at Carnegie-Mellon University.
7e12e63a7Smckusick  *
806adbb7eSmckusick  * %sccs.include.redist.c%
9e12e63a7Smckusick  *
10*69dd407eSbostic  *	@(#)vm_prot.h	8.1 (Berkeley) 06/11/93
1106adbb7eSmckusick  *
1206adbb7eSmckusick  *
1306adbb7eSmckusick  * Copyright (c) 1987, 1990 Carnegie-Mellon University.
1406adbb7eSmckusick  * All rights reserved.
1506adbb7eSmckusick  *
1606adbb7eSmckusick  * Authors: Avadis Tevanian, Jr., Michael Wayne Young
1706adbb7eSmckusick  *
1806adbb7eSmckusick  * Permission to use, copy, modify and distribute this software and
1906adbb7eSmckusick  * its documentation is hereby granted, provided that both the copyright
2006adbb7eSmckusick  * notice and this permission notice appear in all copies of the
2106adbb7eSmckusick  * software, derivative works or modified versions, and any portions
2206adbb7eSmckusick  * thereof, and that both notices appear in supporting documentation.
2306adbb7eSmckusick  *
2406adbb7eSmckusick  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
2506adbb7eSmckusick  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
2606adbb7eSmckusick  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
2706adbb7eSmckusick  *
2806adbb7eSmckusick  * Carnegie Mellon requests users of this software to return to
2906adbb7eSmckusick  *
3006adbb7eSmckusick  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
3106adbb7eSmckusick  *  School of Computer Science
3206adbb7eSmckusick  *  Carnegie Mellon University
3306adbb7eSmckusick  *  Pittsburgh PA 15213-3890
3406adbb7eSmckusick  *
3506adbb7eSmckusick  * any improvements or extensions that they make and grant Carnegie the
3606adbb7eSmckusick  * rights to redistribute these changes.
37e12e63a7Smckusick  */
38e12e63a7Smckusick 
39e12e63a7Smckusick /*
40e12e63a7Smckusick  *	Virtual memory protection definitions.
41e12e63a7Smckusick  */
42e12e63a7Smckusick 
43e12e63a7Smckusick #ifndef	_VM_PROT_
44e12e63a7Smckusick #define	_VM_PROT_
45e12e63a7Smckusick 
46e12e63a7Smckusick /*
47e12e63a7Smckusick  *	Types defined:
48e12e63a7Smckusick  *
49e12e63a7Smckusick  *	vm_prot_t		VM protection values.
50e12e63a7Smckusick  */
51e12e63a7Smckusick 
52e12e63a7Smckusick typedef int		vm_prot_t;
53e12e63a7Smckusick 
54e12e63a7Smckusick /*
55e12e63a7Smckusick  *	Protection values, defined as bits within the vm_prot_t type
56e12e63a7Smckusick  */
57e12e63a7Smckusick 
58e12e63a7Smckusick #define	VM_PROT_NONE	((vm_prot_t) 0x00)
59e12e63a7Smckusick 
60e12e63a7Smckusick #define VM_PROT_READ	((vm_prot_t) 0x01)	/* read permission */
61e12e63a7Smckusick #define VM_PROT_WRITE	((vm_prot_t) 0x02)	/* write permission */
62e12e63a7Smckusick #define VM_PROT_EXECUTE	((vm_prot_t) 0x04)	/* execute permission */
63e12e63a7Smckusick 
64e12e63a7Smckusick /*
65e12e63a7Smckusick  *	The default protection for newly-created virtual memory
66e12e63a7Smckusick  */
67e12e63a7Smckusick 
68e12e63a7Smckusick #define VM_PROT_DEFAULT	(VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE)
69e12e63a7Smckusick 
70e12e63a7Smckusick /*
71e12e63a7Smckusick  *	The maximum privileges possible, for parameter checking.
72e12e63a7Smckusick  */
73e12e63a7Smckusick 
74e12e63a7Smckusick #define VM_PROT_ALL	(VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE)
75e12e63a7Smckusick 
7638344c3dStorek #endif /* _VM_PROT_ */
77