From d56e1a13aa1ce17ff630fc78c9230b37931cadb9 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Mon, 3 Mar 2025 14:43:30 -0500 Subject: [PATCH] kernel/locks: Make the assertion in mutex_destroy print a backtrace of the owning thread. --- src/system/kernel/locks/lock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/kernel/locks/lock.cpp b/src/system/kernel/locks/lock.cpp index 067b73d08b..e53ebc72f8 100644 --- a/src/system/kernel/locks/lock.cpp +++ b/src/system/kernel/locks/lock.cpp @@ -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();