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
91df65b9e778b9d7da7952d766e129f58423b807
Signed-off-by: Jim Warner <james.warner@comcast.net>
case 'R':
++counts->running;
break;
+ case 'D': // 'D' (disk sleep)
case 'S':
- case 'D':
++counts->sleeping;
break;
+ case 't': // 't' (tracing stop)
case 'T':
++counts->stopped;
break;
case 'Z':
++counts->zombied;
break;
- default: // keep gcc happy
+ default:
+ /* currently: 'I' (idle),
+ 'P' (parked),
+ 'X' (dead - actually 'dying' & probably never seen)
+ */
+ ++counts->other;
break;
}
++counts->total;
struct pids_counts {
int total;
- int running, sleeping, stopped, zombied;
+ int running, sleeping, stopped, zombied, other;
};
struct pids_fetch {