aboutsummaryrefslogtreecommitdiff
path: root/sys/vm/vm_map.h
diff options
context:
space:
mode:
authorMaxime Henrion <mux@FreeBSD.org>2004-07-30 09:10:28 +0000
committerMaxime Henrion <mux@FreeBSD.org>2004-07-30 09:10:28 +0000
commit12c649749ce96af5d9368d560f15176fb9f67512 (patch)
tree17d8c4d1e8fd6d7e4d3d3fdd099b30c94a3ee681 /sys/vm/vm_map.h
parentfe6a04858c5a74d9c05ea1710ca538407fe38f8b (diff)
downloadsrc-12c649749ce96af5d9368d560f15176fb9f67512.tar.gz
src-12c649749ce96af5d9368d560f15176fb9f67512.zip
Get rid of another lockmgr(9) consumer by using sx locks for the user
maps. We always acquire the sx lock exclusively here, but we can't use a mutex because we want to be able to sleep while holding the lock. This is completely equivalent to what we were doing with the lockmgr(9) locks before. Approved by: alc
Notes
Notes: svn path=/head/; revision=132880
Diffstat (limited to 'sys/vm/vm_map.h')
-rw-r--r--sys/vm/vm_map.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h
index abd809fc4e64..8616c60c237f 100644
--- a/sys/vm/vm_map.h
+++ b/sys/vm/vm_map.h
@@ -67,7 +67,7 @@
#define _VM_MAP_
#include <sys/lock.h>
-#include <sys/lockmgr.h>
+#include <sys/sx.h>
#include <sys/_mutex.h>
/*
@@ -164,7 +164,7 @@ vm_map_entry_behavior(vm_map_entry_t entry)
*/
struct vm_map {
struct vm_map_entry header; /* List of entries */
- struct lock lock; /* Lock for map data */
+ struct sx lock; /* Lock for map data */
struct mtx system_mtx;
int nentries; /* Number of entries */
vm_size_t size; /* virtual size */