summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_turnstile.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-04-21 20:40:43 +0000
committerjhb <jhb@FreeBSD.org>2006-04-21 20:40:43 +0000
commit8c0b6ba0a35692a3de5b659f7d1eafd854387486 (patch)
tree7001118e98ebee8a93429b1ab5ea20a73f1069a4 /sys/kern/subr_turnstile.c
parentc535e79f0bfe7c6b5c69d73bbb4898d3dd6893b7 (diff)
downloadFreeBSD-src-8c0b6ba0a35692a3de5b659f7d1eafd854387486.zip
FreeBSD-src-8c0b6ba0a35692a3de5b659f7d1eafd854387486.tar.gz
Print td_name instead of p_comm if td_name is non-empty for
'show turnstile' and 'show sleepq'.
Diffstat (limited to 'sys/kern/subr_turnstile.c')
-rw-r--r--sys/kern/subr_turnstile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c
index dd91b08..16562f8 100644
--- a/sys/kern/subr_turnstile.c
+++ b/sys/kern/subr_turnstile.c
@@ -968,7 +968,8 @@ print_thread(struct thread *td, const char *prefix)
{
db_printf("%s%p (tid %d, pid %d, \"%s\")\n", prefix, td, td->td_tid,
- td->td_proc->p_pid, td->td_proc->p_comm);
+ td->td_proc->p_pid, td->td_name[0] != '\0' ? td->td_name :
+ td->td_proc->p_comm);
}
static void
OpenPOWER on IntegriCloud