diff options
author | iedowse <iedowse@FreeBSD.org> | 2002-06-20 14:03:36 +0000 |
---|---|---|
committer | iedowse <iedowse@FreeBSD.org> | 2002-06-20 14:03:36 +0000 |
commit | ddd0934a7cf74148bd18ae54dfa8ce6c3b92be2a (patch) | |
tree | 4a91233ade4538e16b66592af5270a438d345ca8 /sys/kern/tty.c | |
parent | e62709f86b6472595c119067ede18ad5833de63d (diff) | |
download | FreeBSD-src-ddd0934a7cf74148bd18ae54dfa8ce6c3b92be2a.zip FreeBSD-src-ddd0934a7cf74148bd18ae54dfa8ce6c3b92be2a.tar.gz |
Display the mutex name in the ^T status line if the selected thread
is blocked on a mutex. Prepend a '*' to distinguish this case as
is done in top(1).
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r-- | sys/kern/tty.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index cc96da6..b9c5743 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -2393,6 +2393,7 @@ ttyinfo(struct tty *tp) td = FIRST_THREAD_IN_PROC(pick); stmp = pick->p_stat == SRUN ? "running" : /* XXXKSE */ + pick->p_stat == SMTX ? td->td_mtxname : td->td_wmesg ? td->td_wmesg : "iowait"; calcru(pick, &utime, &stime, NULL); ltmp = pick->p_stat == SIDL || pick->p_stat == SWAIT || @@ -2400,8 +2401,8 @@ ttyinfo(struct tty *tp) pgtok(vmspace_resident_count(pick->p_vmspace)); mtx_unlock_spin(&sched_lock); - ttyprintf(tp, " cmd: %s %d [%s] ", pick->p_comm, pick->p_pid, - stmp); + ttyprintf(tp, " cmd: %s %d [%s%s] ", pick->p_comm, + pick->p_pid, pick->p_stat == SMTX ? "*" : "", stmp); /* Print user time. */ ttyprintf(tp, "%ld.%02ldu ", |