aboutsummaryrefslogtreecommitdiff
path: root/vm/vm_map.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2016-12-24 02:31:34 +0100
committerRichard Braun <rbraun@sceen.net>2016-12-24 02:31:34 +0100
commit2b0f19f602e08fd9d37268233b962674fd592634 (patch)
tree90a4bfa49483ccdcddbbcd20749de7f864272d64 /vm/vm_map.h
parent023401c5b97023670a44059a60eb2a3a11c8a929 (diff)
downloadgnumach-2b0f19f602e08fd9d37268233b962674fd592634.tar.gz
gnumach-2b0f19f602e08fd9d37268233b962674fd592634.tar.bz2
gnumach-2b0f19f602e08fd9d37268233b962674fd592634.zip
VM: add the vm_wire_all call
This call maps the POSIX mlockall and munlockall calls. * Makefrag.am (include_mach_HEADERS): Add include/mach/vm_wire.h. * include/mach/gnumach.defs (vm_wire_t): New type. (vm_wire_all): New routine. * include/mach/mach_types.h: Include mach/vm_wire.h. * vm/vm_map.c: Likewise. (vm_map_enter): Automatically wire new entries if requested. (vm_map_copyout): Likewise. (vm_map_pageable_all): New function. vm/vm_map.h: Include mach/vm_wire.h. (struct vm_map): Update description of member `wiring_required'. (vm_map_pageable_all): New function. * vm/vm_user.c (vm_wire_all): New function.
Diffstat (limited to 'vm/vm_map.h')
-rw-r--r--vm/vm_map.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/vm/vm_map.h b/vm/vm_map.h
index aa68b92c..87660f31 100644
--- a/vm/vm_map.h
+++ b/vm/vm_map.h
@@ -46,6 +46,7 @@
#include <mach/vm_attributes.h>
#include <mach/vm_prot.h>
#include <mach/vm_inherit.h>
+#include <mach/vm_wire.h>
#include <vm/pmap.h>
#include <vm/vm_object.h>
#include <vm/vm_page.h>
@@ -191,7 +192,7 @@ struct vm_map {
/* Flags */
unsigned int wait_for_space:1, /* Should callers wait
for space? */
- /* boolean_t */ wiring_required:1; /* All memory wired? */
+ /* boolean_t */ wiring_required:1; /* New mappings are wired? */
unsigned int timestamp; /* Version number */
@@ -492,6 +493,8 @@ static inline void vm_map_set_name(vm_map_t map, const char *name)
extern kern_return_t vm_map_pageable(vm_map_t, vm_offset_t, vm_offset_t,
vm_prot_t, boolean_t, boolean_t);
+extern kern_return_t vm_map_pageable_all(vm_map_t, vm_wire_t);
+
/*
* Submap object. Must be used to create memory to be put
* in a submap by vm_map_submap.