Another improvement of the debug code - it seems to has a different cause than I thought.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12839 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -125,11 +125,13 @@ acquire_spinlock(spinlock *lock)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#if DEBUG_SPINLOCKS
|
#if DEBUG_SPINLOCKS
|
||||||
|
int32 oldValue;
|
||||||
if (are_interrupts_enabled())
|
if (are_interrupts_enabled())
|
||||||
panic("acquire_spinlock: attempt to acquire lock %p with interrupts enabled\n", lock);
|
panic("acquire_spinlock: attempt to acquire lock %p with interrupts enabled\n", lock);
|
||||||
if (atomic_set((int32 *)lock, 1) != 0) {
|
oldValue = atomic_set((int32 *)lock, 1);
|
||||||
panic("acquire_spinlock: attempt to acquire lock %p twice on non-SMP system (last caller: %p)\n",
|
if (oldValue != 0) {
|
||||||
lock, find_lock_caller(lock));
|
panic("acquire_spinlock: attempt to acquire lock %p twice on non-SMP system (last caller: %p, value %ld)\n",
|
||||||
|
lock, find_lock_caller(lock), oldValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
push_lock_caller(arch_get_caller(), lock);
|
push_lock_caller(arch_get_caller(), lock);
|
||||||
|
|||||||
Reference in New Issue
Block a user