Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Dec 2019 19:36:41 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r355505 - head/sys/vm
Message-ID:  <201912071936.xB7Jafk0002222@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Sat Dec  7 19:36:40 2019
New Revision: 355505
URL: https://svnweb.freebsd.org/changeset/base/355505

Log:
  Provide vm_map_entry traversal routines to userspace.
  
  This is required for now to allow libprocstat to compile.
  
  Discussed with:	dougm

Modified:
  head/sys/vm/vm_map.h

Modified: head/sys/vm/vm_map.h
==============================================================================
--- head/sys/vm/vm_map.h	Sat Dec  7 19:05:48 2019	(r355504)
+++ head/sys/vm/vm_map.h	Sat Dec  7 19:36:40 2019	(r355505)
@@ -402,27 +402,6 @@ long vmspace_resident_count(struct vmspace *vmspace);
 
 #define VM_MAP_WIRE_WRITE	4	/* Validate writable. */
 
-#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)
 {
@@ -448,6 +427,27 @@ 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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912071936.xB7Jafk0002222>