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>
This commit is contained in:
Julian Elischer 2002-07-18 21:19:56 +00:00
parent 288fa14ac4
commit 9f189ade99
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=100337

View File

@ -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,