kernel/locks: Make the assertion in mutex_destroy print a backtrace of the owning thread.
This commit is contained in:
@@ -880,7 +880,7 @@ mutex_destroy(mutex* lock)
|
|||||||
#if KDEBUG
|
#if KDEBUG
|
||||||
if (lock->holder != -1 && thread_get_current_thread_id() != lock->holder) {
|
if (lock->holder != -1 && thread_get_current_thread_id() != lock->holder) {
|
||||||
panic("mutex_destroy(): the lock (%p) is held by %" B_PRId32 ", not "
|
panic("mutex_destroy(): the lock (%p) is held by %" B_PRId32 ", not "
|
||||||
"by the caller", lock, lock->holder);
|
"by the caller @! bt %" B_PRId32, lock, lock->holder, lock->holder);
|
||||||
if (_mutex_lock(lock, &locker) != B_OK)
|
if (_mutex_lock(lock, &locker) != B_OK)
|
||||||
return;
|
return;
|
||||||
locker.Lock();
|
locker.Lock();
|
||||||
|
|||||||
Reference in New Issue
Block a user