xref: /csrg-svn/sys/vm/vm_prot.h (revision 63379)
145748Smckusick /*
2*63379Sbostic  * Copyright (c) 1991, 1993
3*63379Sbostic  *	The Regents of the University of California.  All rights reserved.
445748Smckusick  *
545748Smckusick  * This code is derived from software contributed to Berkeley by
645748Smckusick  * The Mach Operating System project at Carnegie-Mellon University.
745748Smckusick  *
848493Smckusick  * %sccs.include.redist.c%
945748Smckusick  *
10*63379Sbostic  *	@(#)vm_prot.h	8.1 (Berkeley) 06/11/93
1148493Smckusick  *
1248493Smckusick  *
1348493Smckusick  * Copyright (c) 1987, 1990 Carnegie-Mellon University.
1448493Smckusick  * All rights reserved.
1548493Smckusick  *
1648493Smckusick  * Authors: Avadis Tevanian, Jr., Michael Wayne Young
1748493Smckusick  *
1848493Smckusick  * Permission to use, copy, modify and distribute this software and
1948493Smckusick  * its documentation is hereby granted, provided that both the copyright
2048493Smckusick  * notice and this permission notice appear in all copies of the
2148493Smckusick  * software, derivative works or modified versions, and any portions
2248493Smckusick  * thereof, and that both notices appear in supporting documentation.
2348493Smckusick  *
2448493Smckusick  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
2548493Smckusick  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
2648493Smckusick  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
2748493Smckusick  *
2848493Smckusick  * Carnegie Mellon requests users of this software to return to
2948493Smckusick  *
3048493Smckusick  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
3148493Smckusick  *  School of Computer Science
3248493Smckusick  *  Carnegie Mellon University
3348493Smckusick  *  Pittsburgh PA 15213-3890
3448493Smckusick  *
3548493Smckusick  * any improvements or extensions that they make and grant Carnegie the
3648493Smckusick  * rights to redistribute these changes.
3745748Smckusick  */
3845748Smckusick 
3945748Smckusick /*
4045748Smckusick  *	Virtual memory protection definitions.
4145748Smckusick  */
4245748Smckusick 
4345748Smckusick #ifndef	_VM_PROT_
4445748Smckusick #define	_VM_PROT_
4545748Smckusick 
4645748Smckusick /*
4745748Smckusick  *	Types defined:
4845748Smckusick  *
4945748Smckusick  *	vm_prot_t		VM protection values.
5045748Smckusick  */
5145748Smckusick 
5245748Smckusick typedef int		vm_prot_t;
5345748Smckusick 
5445748Smckusick /*
5545748Smckusick  *	Protection values, defined as bits within the vm_prot_t type
5645748Smckusick  */
5745748Smckusick 
5845748Smckusick #define	VM_PROT_NONE	((vm_prot_t) 0x00)
5945748Smckusick 
6045748Smckusick #define VM_PROT_READ	((vm_prot_t) 0x01)	/* read permission */
6145748Smckusick #define VM_PROT_WRITE	((vm_prot_t) 0x02)	/* write permission */
6245748Smckusick #define VM_PROT_EXECUTE	((vm_prot_t) 0x04)	/* execute permission */
6345748Smckusick 
6445748Smckusick /*
6545748Smckusick  *	The default protection for newly-created virtual memory
6645748Smckusick  */
6745748Smckusick 
6845748Smckusick #define VM_PROT_DEFAULT	(VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE)
6945748Smckusick 
7045748Smckusick /*
7145748Smckusick  *	The maximum privileges possible, for parameter checking.
7245748Smckusick  */
7345748Smckusick 
7445748Smckusick #define VM_PROT_ALL	(VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE)
7545748Smckusick 
7660337Storek #endif /* _VM_PROT_ */
77