diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-08-12 05:18:43 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-08-12 05:18:43 +0000 |
commit | ca77cc963b66a482374ac7cd83dd7aafd15f56f6 (patch) | |
tree | 87ff834e089303a2c4c8395e4596906a70bb391f /sys/uvm | |
parent | a75a6f8ff3fb15b2d7ee889f933212fdaee2f5b2 (diff) |
vm/vm_prot.h no more
Diffstat (limited to 'sys/uvm')
-rw-r--r-- | sys/uvm/uvm_extern.h | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/sys/uvm/uvm_extern.h b/sys/uvm/uvm_extern.h index 209e182cdae..b66f85b4c3c 100644 --- a/sys/uvm/uvm_extern.h +++ b/sys/uvm/uvm_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_extern.h,v 1.19 2001/08/11 10:57:22 art Exp $ */ +/* $OpenBSD: uvm_extern.h,v 1.20 2001/08/12 05:18:41 mickey Exp $ */ /* $NetBSD: uvm_extern.h,v 1.42 2000/06/08 05:52:34 thorpej Exp $ */ /* @@ -88,6 +88,35 @@ /* bits 0x700: max protection, 0x800: not used */ /* bits 0x7000: advice, 0x8000: not used */ + +typedef int vm_prot_t; + +/* + * Protection values, defined as bits within the vm_prot_t type + * + * These are funky definitions from old CMU VM and are kept + * for compatibility reasons, one day they are going to die, + * just like everybody else. + */ + +#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 */ + +/* + * 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) + /* advice: matches MADV_* from sys/mman.h */ #define UVM_ADV_NORMAL 0x0 /* 'normal' */ #define UVM_ADV_RANDOM 0x1 /* 'random' */ |