diff options
author | julian <julian@FreeBSD.org> | 2002-07-18 21:19:56 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2002-07-18 21:19:56 +0000 |
commit | 505a8867742d0d980e284c1813f5264d90a21e35 (patch) | |
tree | 006ce152186fc059ed79b03949b50b48f69c339b /sys/kern/tty.c | |
parent | 63afba9f66e6db9c328d43e463254994b758bf41 (diff) | |
download | FreeBSD-src-505a8867742d0d980e284c1813f5264d90a21e35.zip FreeBSD-src-505a8867742d0d980e284c1813f5264d90a21e35.tar.gz |
Clear up confusion in ugly code. ^T gave wrong results for RSS.
I misinterpretted this code when changing it to handle threads.
(there are still issues here)
Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r-- | sys/kern/tty.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 6c915e1..efac248 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -2411,10 +2411,15 @@ ttyinfo(struct tty *tp) } } calcru(pick, &utime, &stime, NULL); - ltmp = ((pick->p_state == PRS_NEW) - || (td && (td->td_state == TDS_IWAIT)) - || (pick->p_state == PRS_ZOMBIE ? 0 : - pgtok(vmspace_resident_count(pick->p_vmspace)))); + /* XXXKSE The TDS_IWAIT line is Dubious */ + if (pick->p_state == PRS_NEW || + (td && (td->td_state == TDS_IWAIT)) || + pick->p_state == PRS_ZOMBIE) { + ltmp = 0; + } else { + ltmp = pgtok( + vmspace_resident_count(pick->p_vmspace)); + } mtx_unlock_spin(&sched_lock); ttyprintf(tp, " cmd: %s %d [%s%s] ", pick->p_comm, |