summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_mutex.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-07-30 20:42:15 +0000
committerjhb <jhb@FreeBSD.org>2003-07-30 20:42:15 +0000
commit97e378fb00972dd4d5c50c5d134cfaac0a90728b (patch)
tree83f3f6ed5280baaa12306392af813345672cd22a /sys/kern/kern_mutex.c
parent7cf11d8bc83f81c96eb0ebcdb0043a261747cc4a (diff)
downloadFreeBSD-src-97e378fb00972dd4d5c50c5d134cfaac0a90728b.zip
FreeBSD-src-97e378fb00972dd4d5c50c5d134cfaac0a90728b.tar.gz
When complaining about a sleeping thread owning a mutex, display the
thread's pid to make debugging easier for people who don't want to have to use the intended tool for these panics (witness). Indirectly prodded by: kris
Diffstat (limited to 'sys/kern/kern_mutex.c')
-rw-r--r--sys/kern/kern_mutex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c
index 18dcc7e..bf157eb 100644
--- a/sys/kern/kern_mutex.c
+++ b/sys/kern/kern_mutex.c
@@ -119,7 +119,9 @@ propagate_priority(struct thread *td)
MPASS(td->td_proc != NULL);
MPASS(td->td_proc->p_magic == P_MAGIC);
- KASSERT(!TD_IS_SLEEPING(td), ("sleeping thread owns a mutex"));
+ KASSERT(!TD_IS_SLEEPING(td), (
+ "sleeping thread (pid %d) owns a mutex",
+ td->td_proc->p_pid));
if (td->td_priority <= pri) /* lower is higher priority */
return;
OpenPOWER on IntegriCloud