Print out process name and thread id in the debugging message.

This is useful because the message can end up in system logs in
non-debugging operation.

Reviewed by:	attilio (earlier version)
This commit is contained in:
Ivan Voras 2012-03-05 14:19:43 +00:00
parent 31452ff75e
commit 2573ea5f76

View File

@ -1277,8 +1277,9 @@ lockmgr_printinfo(const struct lock *lk)
(uintmax_t)LK_SHARERS(lk->lk_lock));
else {
td = lockmgr_xholder(lk);
printf("lock type %s: EXCL by thread %p (pid %d)\n",
lk->lock_object.lo_name, td, td->td_proc->p_pid);
printf("lock type %s: EXCL by thread %p "
"(pid %d, %s, tid %d)\n", lk->lock_object.lo_name, td,
td->td_proc->p_pid, td->td_proc->p_comm, td->td_tid);
}
x = lk->lk_lock;