summaryrefslogtreecommitdiff
path: root/vm/vm_map.h
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2007-05-05 00:30:31 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:27:09 +0200
commitb10112ec96516939dc3cb5d523807fda2755fb37 (patch)
treeceffab86c66397428f23266423bc0caddc5a271b /vm/vm_map.h
parent5ccc7791cd3ea06c70af61cf5a580e06b10bcc37 (diff)
2007-05-05 Thomas Schwinge <tschwinge@gnu.org>
We're not in the eighties anymore. List arguments in function prototypes and definitions for a lot of symbols. Also drop some unused prototypes. I refrain from listing every changed symbol. * vm/memory_object.c: Do as described. * vm/memory_object.h: Likewise. * vm/pmap.h: Likewise. * vm/vm_external.c: Likewise. * vm/vm_external.h: Likewise. * vm/vm_fault.c: Likewise. * vm/vm_fault.h: Likewise. * vm/vm_kern.h: Likewise. * vm/vm_map.c: Likewise. * vm/vm_map.h: Likewise. * vm/vm_pageout.h: Likewise. * vm/vm_user.h: Likewise. * vm/memory_object.h: Include <ipc/ipc_types.h>. * vm/pmap.h: Include <kern/thread.h>. * vm/vm_fault.h: Include <mach/vm_prot.h>, <vm/vm_map.h> and <vm/vm_types.h>. * vm/vm_map.h: Include <mach/vm_attributes.h> and <vm/vm_types.h>. (vm_map_t, VM_MAP_NULL): Remove type and definition. * vm/vm_object.h (vm_object_t, VM_OBJECT_NULL): Remove type and definition. * vm/vm_page.h: Include <vm/vm_types.h>. (vm_page_t, VM_PAGE_NULL): Remove type and definition. * vm/vm_user.h: Include <mach/std_types.h>. * kern/task.h: Include <vm/vm_types.h> instead of <vm/vm_map.h>. * vm/vm_types.h: New file: the above-removed types and definitions.
Diffstat (limited to 'vm/vm_map.h')
-rw-r--r--vm/vm_map.h112
1 files changed, 71 insertions, 41 deletions
diff --git a/vm/vm_map.h b/vm/vm_map.h
index af85ef9d..25c00651 100644
--- a/vm/vm_map.h
+++ b/vm/vm_map.h
@@ -43,18 +43,19 @@
#include <mach/kern_return.h>
#include <mach/boolean.h>
#include <mach/machine/vm_types.h>
+#include <mach/vm_attributes.h>
#include <mach/vm_prot.h>
#include <mach/vm_inherit.h>
#include <vm/pmap.h>
#include <vm/vm_object.h>
#include <vm/vm_page.h>
+#include <vm/vm_types.h>
#include <kern/lock.h>
#include <kern/macro_help.h>
/*
* Types defined:
*
- * vm_map_t the high-level address map data structure.
* vm_map_entry_t an entry in an address map.
* vm_map_version_t a timestamp of a map, for use with vm_map_lookup
* vm_map_copy_t represents memory copied from an address map,
@@ -171,9 +172,6 @@ struct vm_map {
boolean_t wiring_required;/* All memory wired? */
unsigned int timestamp; /* Version number */
};
-typedef struct vm_map *vm_map_t;
-
-#define VM_MAP_NULL ((vm_map_t) 0)
#define vm_map_to_entry(map) ((struct vm_map_entry *) &(map)->hdr.links)
#define vm_map_first_entry(map) ((map)->hdr.links.next)
@@ -356,43 +354,73 @@ MACRO_END
extern vm_offset_t kentry_data;
extern vm_offset_t kentry_data_size;
extern int kentry_count;
-extern void vm_map_init(); /* Initialize the module */
-
-extern vm_map_t vm_map_create(); /* Create an empty map */
-extern vm_map_t vm_map_fork(); /* Create a map in the image
- * of an existing map */
-
-extern void vm_map_reference(); /* Gain a reference to
- * an existing map */
-extern void vm_map_deallocate(); /* Lose a reference */
-
-extern kern_return_t vm_map_enter(); /* Enter a mapping */
-extern kern_return_t vm_map_find_entry(); /* Enter a mapping primitive */
-extern kern_return_t vm_map_remove(); /* Deallocate a region */
-extern kern_return_t vm_map_protect(); /* Change protection */
-extern kern_return_t vm_map_inherit(); /* Change inheritance */
-
-extern void vm_map_print(); /* Debugging: print a map */
-
-extern kern_return_t vm_map_lookup(); /* Look up an address */
-extern boolean_t vm_map_verify(); /* Verify that a previous
- * lookup is still valid */
+/* Initialize the module */
+extern void vm_map_init(void);
+
+/* Create an empty map */
+extern vm_map_t vm_map_create(pmap_t, vm_offset_t, vm_offset_t,
+ boolean_t);
+/* Create a map in the image of an existing map */
+extern vm_map_t vm_map_fork(vm_map_t);
+
+/* Gain a reference to an existing map */
+extern void vm_map_reference(vm_map_t);
+/* Lose a reference */
+extern void vm_map_deallocate(vm_map_t);
+
+/* Enter a mapping */
+extern kern_return_t vm_map_enter(vm_map_t, vm_offset_t *, vm_size_t,
+ vm_offset_t, boolean_t, vm_object_t,
+ vm_offset_t, boolean_t, vm_prot_t,
+ vm_prot_t, vm_inherit_t);
+/* Enter a mapping primitive */
+extern kern_return_t vm_map_find_entry(vm_map_t, vm_offset_t *, vm_size_t,
+ vm_offset_t, vm_object_t,
+ vm_map_entry_t *);
+/* Deallocate a region */
+extern kern_return_t vm_map_remove(vm_map_t, vm_offset_t, vm_offset_t);
+/* Change protection */
+extern kern_return_t vm_map_protect(vm_map_t, vm_offset_t, vm_offset_t,
+ vm_prot_t, boolean_t);
+/* Change inheritance */
+extern kern_return_t vm_map_inherit(vm_map_t, vm_offset_t, vm_offset_t,
+ vm_inherit_t);
+
+/* Debugging: print a map */
+extern void vm_map_print(vm_map_t);
+
+/* Look up an address */
+extern kern_return_t vm_map_lookup(vm_map_t *, vm_offset_t, vm_prot_t,
+ vm_map_version_t *, vm_object_t *,
+ vm_offset_t *, vm_prot_t *, boolean_t *);
+/* Verify that a previous lookup is still valid */
+extern boolean_t vm_map_verify(vm_map_t, vm_map_version_t *);
/* vm_map_verify_done is now a macro -- see below */
-extern kern_return_t vm_map_copyin(); /* Make a copy of a region */
-extern kern_return_t vm_map_copyin_page_list();/* Make a copy of a region
- * using a page list copy */
-extern kern_return_t vm_map_copyout(); /* Place a copy into a map */
-extern kern_return_t vm_map_copy_overwrite();/* Overwrite existing memory
- * with a copy */
-extern void vm_map_copy_discard(); /* Discard a copy without
- * using it */
-extern kern_return_t vm_map_copy_discard_cont();/* Page list continuation
- * version of previous */
-
-extern kern_return_t vm_map_machine_attribute();
- /* Add or remove machine-
- dependent attributes from
- map regions */
+/* Make a copy of a region */
+extern kern_return_t vm_map_copyin(vm_map_t, vm_offset_t, vm_size_t,
+ boolean_t, vm_map_copy_t *);
+/* Make a copy of a region using a page list copy */
+extern kern_return_t vm_map_copyin_page_list(vm_map_t, vm_offset_t,
+ vm_size_t, boolean_t,
+ boolean_t, vm_map_copy_t *,
+ boolean_t);
+/* Place a copy into a map */
+extern kern_return_t vm_map_copyout(vm_map_t, vm_offset_t *, vm_map_copy_t);
+/* Overwrite existing memory with a copy */
+extern kern_return_t vm_map_copy_overwrite(vm_map_t, vm_offset_t,
+ vm_map_copy_t, boolean_t);
+/* Discard a copy without using it */
+extern void vm_map_copy_discard(vm_map_copy_t);
+extern vm_map_copy_t vm_map_copy_copy(vm_map_copy_t);
+/* Page list continuation version of previous */
+extern kern_return_t vm_map_copy_discard_cont(vm_map_copyin_args_t,
+ vm_map_copy_t *);
+
+/* Add or remove machine- dependent attributes from map regions */
+extern kern_return_t vm_map_machine_attribute(vm_map_t, vm_offset_t,
+ vm_size_t,
+ vm_machine_attribute_t,
+ vm_machine_attribute_val_t *);
/*
* Functions implemented as macros
@@ -415,7 +443,9 @@ extern kern_return_t vm_map_machine_attribute();
/*
* Pageability functions. Includes macro to preserve old interface.
*/
-extern kern_return_t vm_map_pageable_common();
+extern kern_return_t vm_map_pageable_common(vm_map_t, vm_offset_t,
+ vm_offset_t, vm_prot_t,
+ boolean_t);
#define vm_map_pageable(map, s, e, access) \
vm_map_pageable_common(map, s, e, access, FALSE)