summaryrefslogtreecommitdiff
path: root/vm/pmap.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/pmap.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/pmap.h')
-rw-r--r--vm/pmap.h97
1 files changed, 37 insertions, 60 deletions
diff --git a/vm/pmap.h b/vm/pmap.h
index 98ef5ba..04ab4e9 100644
--- a/vm/pmap.h
+++ b/vm/pmap.h
@@ -42,6 +42,7 @@
#include <mach/machine/vm_types.h>
#include <mach/vm_prot.h>
#include <mach/boolean.h>
+#include <kern/thread.h>
/*
* The following is a description of the interface to the
@@ -62,21 +63,15 @@
* but it is not part of the interface.
*/
-extern vm_offset_t pmap_steal_memory(); /* During VM initialization,
- * steal a chunk of memory.
- */
-extern unsigned int pmap_free_pages(); /* During VM initialization,
- * report remaining unused
- * physical pages.
- */
-extern void pmap_startup(); /* During VM initialization,
- * use remaining physical pages
- * to allocate page frames.
- */
-extern void pmap_init(); /* Initialization,
- * after kernel runs
- * in virtual memory.
- */
+/* During VM initialization, steal a chunk of memory. */
+extern vm_offset_t pmap_steal_memory(vm_size_t);
+/* During VM initialization, report remaining unused physical pages. */
+extern unsigned int pmap_free_pages(void);
+/* During VM initialization, use remaining physical pages to allocate page
+ * frames. */
+extern void pmap_startup(vm_offset_t *, vm_offset_t *);
+/* Initialization, after kernel runs in virtual memory. */
+extern void pmap_init(void);
#ifndef MACHINE_PAGES
/*
@@ -95,14 +90,10 @@ extern void pmap_init(); /* Initialization,
* However, for best performance pmap_free_pages should be accurate.
*/
-extern boolean_t pmap_next_page(); /* During VM initialization,
- * return the next unused
- * physical page.
- */
-extern void pmap_virtual_space(); /* During VM initialization,
- * report virtual space
- * available for the kernel.
- */
+/* During VM initialization, return the next unused physical page. */
+extern boolean_t pmap_next_page(vm_offset_t *);
+/* During VM initialization, report virtual space available for the kernel. */
+extern void pmap_virtual_space(vm_offset_t *, vm_offset_t *);
#endif /* MACHINE_PAGES */
/*
@@ -139,12 +130,10 @@ void pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
/*
* Routines to set up hardware state for physical maps to be used.
*/
-extern void pmap_activate(); /* Prepare pmap_t to run
- * on a given processor.
- */
-extern void pmap_deactivate(); /* Release pmap_t from
- * use on processor.
- */
+/* Prepare pmap_t to run on a given processor. */
+extern void pmap_activate(pmap_t, thread_t, int);
+/* Release pmap_t from use on processor. */
+extern void pmap_deactivate(pmap_t, thread_t, int);
/*
@@ -178,7 +167,6 @@ boolean_t pmap_is_modified(vm_offset_t pa);
/*
* Statistics routines
*/
-extern void pmap_statistics(); /* Return statistics */
#ifndef pmap_resident_count
extern int pmap_resident_count();
@@ -187,48 +175,37 @@ extern int pmap_resident_count();
/*
* Sundry required routines
*/
-extern vm_offset_t pmap_extract(); /* Return a virtual-to-physical
- * mapping, if possible.
- */
-
-extern boolean_t pmap_access(); /* Is virtual address valid? */
-
-extern void pmap_collect(); /* Perform garbage
- * collection, if any
- */
-
-extern void pmap_change_wiring(); /* Specify pageability */
+/* Return a virtual-to-physical mapping, if possible. */
+extern vm_offset_t pmap_extract(pmap_t, vm_offset_t);
+/* Is virtual address valid? */
+extern boolean_t pmap_access();
+/* Perform garbage collection, if any. */
+extern void pmap_collect(pmap_t);
+/* Specify pageability. */
+extern void pmap_change_wiring(pmap_t, vm_offset_t, boolean_t);
#ifndef pmap_phys_address
-extern vm_offset_t pmap_phys_address(); /* Transform address
- * returned by device
- * driver mapping function
- * to physical address
- * known to this module.
- */
+/* Transform address returned by device driver mapping function to physical
+ * address known to this module. */
+extern vm_offset_t pmap_phys_address();
#endif /* pmap_phys_address */
#ifndef pmap_phys_to_frame
-extern int pmap_phys_to_frame(); /* Inverse of
- * pmap_phys_address,
- * for use by device driver
- * mapping function in
- * machine-independent
- * pseudo-devices.
- */
+/* Inverse of pmap_phys_address, for use by device driver mapping function in
+ * machine-independent pseudo-devices. */
+extern int pmap_phys_to_frame();
#endif /* pmap_phys_to_frame */
/*
* Optional routines
*/
#ifndef pmap_copy
-extern void pmap_copy(); /* Copy range of
- * mappings, if desired.
- */
+/* Copy range of mappings, if desired. */
+extern void pmap_copy(pmap_t, pmap_t, vm_offset_t, vm_size_t,
+ vm_offset_t);
#endif /* pmap_copy */
#ifndef pmap_attribute
-extern kern_return_t pmap_attribute(); /* Get/Set special
- * memory attributes
- */
+/* Get/Set special memory attributes. */
+extern kern_return_t pmap_attribute();
#endif /* pmap_attribute */
/*