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:
jhb 2003-07-30 20:42:15 +00:00
parent 7cf11d8bc8
commit 97e378fb00
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;