diff options
author | alc <alc@FreeBSD.org> | 2002-04-28 23:12:52 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-04-28 23:12:52 +0000 |
commit | 50524fd0df75e3fa875c2099f09e84259b5c28c1 (patch) | |
tree | b013714cd088600c0927c92c80a46f98dab3a06d /sys/vm/vm_map.h | |
parent | edb0df5e22bc09bafb7ea3d8fb9e738cfe7989b0 (diff) | |
download | FreeBSD-src-50524fd0df75e3fa875c2099f09e84259b5c28c1.zip FreeBSD-src-50524fd0df75e3fa875c2099f09e84259b5c28c1.tar.gz |
Pass the caller's file name and line number to the vm_map locking functions.
Diffstat (limited to 'sys/vm/vm_map.h')
-rw-r--r-- | sys/vm/vm_map.h | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 8de264f..79e8f7a 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -70,6 +70,7 @@ #ifndef _VM_MAP_ #define _VM_MAP_ +#include <sys/lock.h> #include <sys/lockmgr.h> #ifdef MAP_LOCK_DIAGNOSTIC @@ -237,15 +238,29 @@ void vm_map_entry_set_behavior(struct vm_map_entry *entry, u_char behavior); } while (0) #endif -void vm_map_lock(vm_map_t map); -void vm_map_unlock(vm_map_t map); -void vm_map_lock_read(vm_map_t map); -void vm_map_unlock_read(vm_map_t map); -int vm_map_trylock(vm_map_t map); -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); +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_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); +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); +void _vm_map_set_recursive(vm_map_t map, const char *file, int line); +void _vm_map_clear_recursive(vm_map_t map, const char *file, int line); + +#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_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) +#define vm_map_lock_upgrade(map) \ + _vm_map_lock_upgrade(map, LOCK_FILE, LOCK_LINE) +#define vm_map_lock_downgrade(map) \ + _vm_map_lock_downgrade(map, LOCK_FILE, LOCK_LINE) +#define vm_map_set_recursive(map) \ + _vm_map_set_recursive(map, LOCK_FILE, LOCK_LINE) +#define vm_map_clear_recursive(map) \ + _vm_map_clear_recursive(map, LOCK_FILE, LOCK_LINE) struct pmap *vmspace_pmap(struct vmspace *vmspace); long vmspace_resident_count(struct vmspace *vmspace); |