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:
parent
288fa14ac4
commit
9f189ade99
@ -2411,10 +2411,15 @@ ttyinfo(struct tty *tp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
calcru(pick, &utime, &stime, NULL);
|
calcru(pick, &utime, &stime, NULL);
|
||||||
ltmp = ((pick->p_state == PRS_NEW)
|
/* XXXKSE The TDS_IWAIT line is Dubious */
|
||||||
|| (td && (td->td_state == TDS_IWAIT))
|
if (pick->p_state == PRS_NEW ||
|
||||||
|| (pick->p_state == PRS_ZOMBIE ? 0 :
|
(td && (td->td_state == TDS_IWAIT)) ||
|
||||||
pgtok(vmspace_resident_count(pick->p_vmspace))));
|
pick->p_state == PRS_ZOMBIE) {
|
||||||
|
ltmp = 0;
|
||||||
|
} else {
|
||||||
|
ltmp = pgtok(
|
||||||
|
vmspace_resident_count(pick->p_vmspace));
|
||||||
|
}
|
||||||
mtx_unlock_spin(&sched_lock);
|
mtx_unlock_spin(&sched_lock);
|
||||||
|
|
||||||
ttyprintf(tp, " cmd: %s %d [%s%s] ", pick->p_comm,
|
ttyprintf(tp, " cmd: %s %d [%s%s] ", pick->p_comm,
|
||||||
|
Loading…
Reference in New Issue
Block a user