kernel/locks: Make the assertion in mutex_destroy print a backtrace of the owning thread.

This commit is contained in:
Augustin Cavalier
2025-03-03 14:43:30 -05:00
parent 752c6e8b9e
commit d56e1a13aa
+1 -1
View File
@@ -880,7 +880,7 @@ mutex_destroy(mutex* lock)
#if KDEBUG
if (lock->holder != -1 && thread_get_current_thread_id() != lock->holder) {
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)
return;
locker.Lock();