1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

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
This commit is contained in:
John Baldwin 2003-07-30 20:42:15 +00:00
parent 1734c95cec
commit 47b722c1af
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118227
2 changed files with 6 additions and 2 deletions

View File

@ -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;

View File

@ -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;