diff options
author | alc <alc@FreeBSD.org> | 2010-09-19 17:43:22 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2010-09-19 17:43:22 +0000 |
commit | f3dba8dd74cc15ab257490b9d68192a103c8f07e (patch) | |
tree | 2cee60e1d6c1322844dbe0e1d34f347368c2986d /sys/vm/vm_map.h | |
parent | a67dfa17fa374c90926bad24ba3ce7cb6e727e80 (diff) | |
download | FreeBSD-src-f3dba8dd74cc15ab257490b9d68192a103c8f07e.zip FreeBSD-src-f3dba8dd74cc15ab257490b9d68192a103c8f07e.tar.gz |
Make refinements to r212824. In particular, don't make
vm_map_unlock_nodefer() part of the synchronization interface for maps.
Add comments to vm_map_unlock_and_wait() and vm_map_wakeup() describing
how they should be used. In particular, describe the deferred deallocations
issue with vm_map_unlock_and_wait().
Redo the implementation of vm_map_unlock_and_wait() so that it passes
along the caller's file and line information, just like the other map
locking primitives.
Reviewed by: kib
X-MFC after: r212824
Diffstat (limited to 'sys/vm/vm_map.h')
-rw-r--r-- | sys/vm/vm_map.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 292522e..18a1edf 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -266,7 +266,7 @@ vmspace_pmap(struct vmspace *vmspace) void _vm_map_lock(vm_map_t map, const char *file, int line); void _vm_map_unlock(vm_map_t map, const char *file, int line); -void _vm_map_unlock_nodefer(vm_map_t map, const char *file, int line); +int _vm_map_unlock_and_wait(vm_map_t map, int timo, const char *file, int line); void _vm_map_lock_read(vm_map_t map, const char *file, int line); void _vm_map_unlock_read(vm_map_t map, const char *file, int line); int _vm_map_trylock(vm_map_t map, const char *file, int line); @@ -274,13 +274,12 @@ int _vm_map_trylock_read(vm_map_t map, const char *file, int line); int _vm_map_lock_upgrade(vm_map_t map, const char *file, int line); void _vm_map_lock_downgrade(vm_map_t map, const char *file, int line); int vm_map_locked(vm_map_t map); -int vm_map_unlock_and_wait(vm_map_t map, int timo); void vm_map_wakeup(vm_map_t map); #define vm_map_lock(map) _vm_map_lock(map, LOCK_FILE, LOCK_LINE) #define vm_map_unlock(map) _vm_map_unlock(map, LOCK_FILE, LOCK_LINE) -#define vm_map_unlock_nodefer(map) \ - _vm_map_unlock_nodefer(map, LOCK_FILE, LOCK_LINE) +#define vm_map_unlock_and_wait(map, timo) \ + _vm_map_unlock_and_wait(map, timo, LOCK_FILE, LOCK_LINE) #define vm_map_lock_read(map) _vm_map_lock_read(map, LOCK_FILE, LOCK_LINE) #define vm_map_unlock_read(map) _vm_map_unlock_read(map, LOCK_FILE, LOCK_LINE) #define vm_map_trylock(map) _vm_map_trylock(map, LOCK_FILE, LOCK_LINE) |