diff options
author | jhb <jhb@FreeBSD.org> | 2000-11-29 21:09:21 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2000-11-29 21:09:21 +0000 |
commit | dcf60473e2e0cb294b2c02896171753c9a553836 (patch) | |
tree | 193eee43132720b2397de7ef44c3535e475dfa6c /bin/ps/print.c | |
parent | b5bd88f4f5f17b408b2353820f51e8580ea3029c (diff) | |
download | FreeBSD-src-dcf60473e2e0cb294b2c02896171753c9a553836.zip FreeBSD-src-dcf60473e2e0cb294b2c02896171753c9a553836.tar.gz |
Introduce a 'mtxname' keyword that displays the current mutex that a
process is blocked on or '-'.
Diffstat (limited to 'bin/ps/print.c')
-rw-r--r-- | bin/ps/print.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c index 600a639..9b1c913 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -394,6 +394,24 @@ lstarted(k, ve) } void +mtxname(k, ve) + KINFO *k; + VARENT *ve; +{ + VAR *v; + + v = ve->var; + if (KI_PROC(k)->p_blocked) { + if (KI_PROC(k)->p_mtxname) + (void)printf("%-*.*s", v->width, v->width, + KI_EPROC(k)->e_mtxname); + else + (void)printf("%-*s", v->width, "???"); + } else + (void)printf("%-*s", v->width, "-"); +} + +void wchan(k, ve) KINFO *k; VARENT *ve; |