When blocked on a mutex, display the mutex name via the wchan string field

so we can at least tell the difference between being blocked in Giant
and being blocked in some other mutex.
This commit is contained in:
Matthew Dillon 2002-02-16 20:10:00 +00:00
parent 644221cd0b
commit ebc1fff946
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=90740

View File

@ -407,8 +407,11 @@ wchan(KINFO *k, VARENT *ve)
else
(void)printf("%-*lx", v->width,
(long)k->ki_p->ki_wchan);
} else
} else if (k->ki_p->ki_kiflag & KI_MTXBLOCK) {
(void)printf("%-*.*s", v->width, v->width, k->ki_p->ki_mtxname);
} else {
(void)printf("%-*s", v->width, "-");
}
}
#ifndef pgtok