diff options
author | dillon <dillon@FreeBSD.org> | 2002-02-16 20:10:00 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 2002-02-16 20:10:00 +0000 |
commit | 77112edb7c995791e7b74003c00e1e2656aab983 (patch) | |
tree | a5538213f1cb95f6b1915dd5b51d0afd7228eb23 /bin/ps/print.c | |
parent | 86dc82cb1763ae86fd60dedc28f6ee6a324d49c3 (diff) | |
download | FreeBSD-src-77112edb7c995791e7b74003c00e1e2656aab983.zip FreeBSD-src-77112edb7c995791e7b74003c00e1e2656aab983.tar.gz |
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.
Diffstat (limited to 'bin/ps/print.c')
-rw-r--r-- | bin/ps/print.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c index 0385308..a372a35 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -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 |