summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_map.h
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-04-27 22:01:37 +0000
committeralc <alc@FreeBSD.org>2002-04-27 22:01:37 +0000
commitd8a09549094e7bab0e8a6c6fe6d06654c3c57387 (patch)
treea7babc5aef0613736b7d0c98d65f5de3c5ed5bc5 /sys/vm/vm_map.h
parent1186b74661db098e0c4e9c8358d77dc50c8dffa2 (diff)
downloadFreeBSD-src-d8a09549094e7bab0e8a6c6fe6d06654c3c57387.zip
FreeBSD-src-d8a09549094e7bab0e8a6c6fe6d06654c3c57387.tar.gz
o Begin documenting the (existing) locking protocol on the vm_map
in the same style as sys/proc.h. o Undo the de-inlining of several trivial, MPSAFE methods on the vm_map. (Contrary to the commit message for vm_map.h revision 1.66 and vm_map.c revision 1.206, de-inlining these methods increased the kernel's size.)
Diffstat (limited to 'sys/vm/vm_map.h')
-rw-r--r--sys/vm/vm_map.h32
1 files changed, 26 insertions, 6 deletions
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h
index dd997d5..fbc44c9 100644
--- a/sys/vm/vm_map.h
+++ b/sys/vm/vm_map.h
@@ -149,6 +149,9 @@ struct vm_map_entry {
* and free tsleep/waking up 'map' and the underlying lockmgr also
* sleeping and waking up on 'map'. The lockup occurs when the map fills
* up. The 'exec' map, for example.
+ *
+ * List of locks
+ * (c) const until freed
*/
struct vm_map {
struct vm_map_entry header; /* List of entries */
@@ -160,11 +163,31 @@ struct vm_map {
vm_map_entry_t hint; /* hint for quick lookups */
unsigned int timestamp; /* Version number */
vm_map_entry_t first_free; /* First free space hint */
- struct pmap *pmap; /* Physical map */
-#define min_offset header.start
-#define max_offset header.end
+ pmap_t pmap; /* (c) Physical map */
+#define min_offset header.start /* (c) */
+#define max_offset header.end /* (c) */
};
+#ifdef _KERNEL
+static __inline vm_offset_t
+vm_map_max(vm_map_t map)
+{
+ return (map->max_offset);
+}
+
+static __inline vm_offset_t
+vm_map_min(vm_map_t map)
+{
+ return (map->min_offset);
+}
+
+static __inline pmap_t
+vm_map_pmap(vm_map_t map)
+{
+ return (map->pmap);
+}
+#endif /* _KERNEL */
+
/*
* Shareable process virtual address space.
* May eventually be merged with vm_map.
@@ -222,9 +245,6 @@ int vm_map_lock_upgrade(vm_map_t map);
void vm_map_lock_downgrade(vm_map_t map);
void vm_map_set_recursive(vm_map_t map);
void vm_map_clear_recursive(vm_map_t map);
-vm_offset_t vm_map_min(vm_map_t map);
-vm_offset_t vm_map_max(vm_map_t map);
-struct pmap *vm_map_pmap(vm_map_t map);
struct pmap *vmspace_pmap(struct vmspace *vmspace);
long vmspace_resident_count(struct vmspace *vmspace);
OpenPOWER on IntegriCloud