top: account for the idle state ('I') threads in total

With the documentation update in the commit referenced
below, we should also account for such threads as they
will already be represented in the task/thread totals.

[ and do it in a way that might avoid future changes ]

Reference(s):
commit a238a687ce

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2018-01-13 00:00:00 -06:00 committed by Craig Small
parent b4bce3b8fa
commit c888534a4e

View File

@ -2728,17 +2728,21 @@ static void procs_hlp (proc_t *this) {
case 'R': case 'R':
Frame_running++; Frame_running++;
break; break;
case 'S': case 't': // 't' (tracing stop)
case 'D':
Frame_sleepin++;
break;
case 'T': case 'T':
Frame_stopped++; Frame_stopped++;
break; break;
case 'Z': case 'Z':
Frame_zombied++; Frame_zombied++;
break; break;
default: // keep gcc happy default:
/* currently: 'D' (disk sleep),
'I' (idle),
'P' (parked),
'S' (sleeping),
'X' (dead - actually 'dying' & probably never seen)
*/
Frame_sleepin++;
break; break;
} }