o Remove dead and lockmgr()-specific debugging code.
This commit is contained in:
parent
059f270266
commit
c1bf294b84
@ -372,7 +372,6 @@ vm_map_entry_set_behavior(struct vm_map_entry *entry, u_char behavior)
|
||||
void
|
||||
_vm_map_lock(vm_map_t map, const char *file, int line)
|
||||
{
|
||||
vm_map_printf("locking map LK_EXCLUSIVE: %p\n", map);
|
||||
if (lockmgr(&map->lock, LK_EXCLUSIVE, NULL, curthread) != 0)
|
||||
panic("vm_map_lock: failed to get lock");
|
||||
map->timestamp++;
|
||||
@ -381,21 +380,18 @@ _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)
|
||||
{
|
||||
vm_map_printf("locking map LK_RELEASE: %p\n", map);
|
||||
lockmgr(&(map)->lock, LK_RELEASE, NULL, curthread);
|
||||
}
|
||||
|
||||
void
|
||||
_vm_map_lock_read(vm_map_t map, const char *file, int line)
|
||||
{
|
||||
vm_map_printf("locking map LK_SHARED: %p\n", map);
|
||||
lockmgr(&(map)->lock, LK_SHARED, NULL, curthread);
|
||||
}
|
||||
|
||||
void
|
||||
_vm_map_unlock_read(vm_map_t map, const char *file, int line)
|
||||
{
|
||||
vm_map_printf("locking map LK_RELEASE: %p\n", map);
|
||||
lockmgr(&(map)->lock, LK_RELEASE, NULL, curthread);
|
||||
}
|
||||
|
||||
@ -411,7 +407,6 @@ static __inline__ int
|
||||
__vm_map_lock_upgrade(vm_map_t map, struct thread *td) {
|
||||
int error;
|
||||
|
||||
vm_map_printf("locking map LK_EXCLUPGRADE: %p\n", map);
|
||||
error = lockmgr(&map->lock, LK_EXCLUPGRADE, NULL, td);
|
||||
if (error == 0)
|
||||
map->timestamp++;
|
||||
@ -427,7 +422,6 @@ _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)
|
||||
{
|
||||
vm_map_printf("locking map LK_DOWNGRADE: %p\n", map);
|
||||
lockmgr(&map->lock, LK_DOWNGRADE, NULL, curthread);
|
||||
}
|
||||
|
||||
|
@ -73,13 +73,6 @@
|
||||
#include <sys/lock.h>
|
||||
#include <sys/lockmgr.h>
|
||||
|
||||
#ifdef MAP_LOCK_DIAGNOSTIC
|
||||
#include <sys/systm.h>
|
||||
#define vm_map_printf(str, arg) printf(str,arg)
|
||||
#else
|
||||
#define vm_map_printf(str, arg)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Types defined:
|
||||
*
|
||||
@ -228,16 +221,6 @@ void vm_map_entry_set_behavior(struct vm_map_entry *entry, u_char behavior);
|
||||
* as unbraced elements in a higher level statement.
|
||||
*/
|
||||
|
||||
#if 0
|
||||
/* XXX This macro is not called anywhere, and (map)->ref_lock doesn't exist. */
|
||||
#define vm_map_lock_drain_interlock(map) \
|
||||
do { \
|
||||
lockmgr(&(map)->lock, LK_DRAIN|LK_INTERLOCK, \
|
||||
&(map)->ref_lock, curthread); \
|
||||
(map)->timestamp++; \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user