diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 090907786834..f3361dd805f1 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -443,6 +443,27 @@ vm_map_entry_read_succ(void *token, struct vm_map_entry *const clone, } #endif /* ! _KERNEL */ +#ifdef _KERNEL +boolean_t vm_map_check_protection (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t); +vm_map_t vm_map_create(pmap_t, vm_offset_t, vm_offset_t); +int vm_map_delete(vm_map_t, vm_offset_t, vm_offset_t); +int vm_map_find(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, + vm_offset_t, int, vm_prot_t, vm_prot_t, int); +int vm_map_find_min(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, + vm_size_t, vm_offset_t, vm_offset_t, int, vm_prot_t, vm_prot_t, int); +int vm_map_fixed(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t, vm_size_t, + vm_prot_t, vm_prot_t, int); +vm_offset_t vm_map_findspace(vm_map_t, vm_offset_t, vm_size_t); +int vm_map_inherit (vm_map_t, vm_offset_t, vm_offset_t, vm_inherit_t); +void vm_map_init(vm_map_t, pmap_t, vm_offset_t, vm_offset_t); +int vm_map_insert (vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t, vm_offset_t, vm_prot_t, vm_prot_t, int); +int vm_map_lookup (vm_map_t *, vm_offset_t, vm_prot_t, vm_map_entry_t *, vm_object_t *, + vm_pindex_t *, vm_prot_t *, boolean_t *); +int vm_map_lookup_locked(vm_map_t *, vm_offset_t, vm_prot_t, vm_map_entry_t *, vm_object_t *, + vm_pindex_t *, vm_prot_t *, boolean_t *); +void vm_map_lookup_done (vm_map_t, vm_map_entry_t); +boolean_t vm_map_lookup_entry (vm_map_t, vm_offset_t, vm_map_entry_t *); + static inline vm_map_entry_t vm_map_entry_first(vm_map_t map) { @@ -468,27 +489,6 @@ vm_map_entry_succ(vm_map_entry_t entry) for ((it) = vm_map_entry_first(map); \ (it) != &(map)->header; \ (it) = vm_map_entry_succ(it)) - -#ifdef _KERNEL -boolean_t vm_map_check_protection (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t); -vm_map_t vm_map_create(pmap_t, vm_offset_t, vm_offset_t); -int vm_map_delete(vm_map_t, vm_offset_t, vm_offset_t); -int vm_map_find(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, - vm_offset_t, int, vm_prot_t, vm_prot_t, int); -int vm_map_find_min(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, - vm_size_t, vm_offset_t, vm_offset_t, int, vm_prot_t, vm_prot_t, int); -int vm_map_fixed(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t, vm_size_t, - vm_prot_t, vm_prot_t, int); -vm_offset_t vm_map_findspace(vm_map_t, vm_offset_t, vm_size_t); -int vm_map_inherit (vm_map_t, vm_offset_t, vm_offset_t, vm_inherit_t); -void vm_map_init(vm_map_t, pmap_t, vm_offset_t, vm_offset_t); -int vm_map_insert (vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t, vm_offset_t, vm_prot_t, vm_prot_t, int); -int vm_map_lookup (vm_map_t *, vm_offset_t, vm_prot_t, vm_map_entry_t *, vm_object_t *, - vm_pindex_t *, vm_prot_t *, boolean_t *); -int vm_map_lookup_locked(vm_map_t *, vm_offset_t, vm_prot_t, vm_map_entry_t *, vm_object_t *, - vm_pindex_t *, vm_prot_t *, boolean_t *); -void vm_map_lookup_done (vm_map_t, vm_map_entry_t); -boolean_t vm_map_lookup_entry (vm_map_t, vm_offset_t, vm_map_entry_t *); int vm_map_protect (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t, boolean_t); int vm_map_remove (vm_map_t, vm_offset_t, vm_offset_t); void vm_map_try_merge_entries(vm_map_t map, vm_map_entry_t prev,