switch(thread_flags & (TF_show_proc|TF_loose_tasks|TF_show_task)){
case TF_show_proc: // normal non-thread output
- for (i = 0; i < pidread->counts.total; i++) {
+ for (i = 0; i < pidread->counts->total; i++) {
buf = pidread->stacks[i];
if (want_this_proc(buf))
show_one_proc(buf, proc_format_list);
break;
case TF_show_task: // -L and -T options
case TF_show_proc|TF_loose_tasks: // H option
- for (i = 0; i < pidread->counts.total; i++) {
+ for (i = 0; i < pidread->counts->total; i++) {
buf = pidread->stacks[i];
if (want_this_proc(buf))
show_one_proc(buf, task_format_list);
break;
case TF_show_proc|TF_show_task: // m and -m options
procps_pids_sort(Pids_info, pidread->stacks
- , pidread->counts.total, PROCPS_PIDS_TIME_START, PROCPS_PIDS_ASCEND);
+ , pidread->counts->total, PROCPS_PIDS_TIME_START, PROCPS_PIDS_ASCEND);
procps_pids_sort(Pids_info, pidread->stacks
- , pidread->counts.total, PROCPS_PIDS_ID_TGID, PROCPS_PIDS_ASCEND);
- for (i = 0; i < pidread->counts.total; i++) {
+ , pidread->counts->total, PROCPS_PIDS_ID_TGID, PROCPS_PIDS_ASCEND);
+ for (i = 0; i < pidread->counts->total; i++) {
buf = pidread->stacks[i];
next_proc:
if (want_this_proc(buf)) {
int self = rSv(ID_PID, s_int, buf);
show_one_proc(buf, proc_format_list);
- for (; i < pidread->counts.total; i++) {
+ for (; i < pidread->counts->total; i++) {
buf = pidread->stacks[i];
if (rSv(ID_TGID, s_int, buf) != self) goto next_proc;
show_one_proc(buf, task_format_list);
? PROCPS_FETCH_THREADS_TOO : PROCPS_FETCH_TASKS_ONLY;
pidread = procps_pids_reap(Pids_info, which);
- if (!pidread || !pidread->counts.total) {
+ if (!pidread || !pidread->counts->total) {
fprintf(stderr, _("fatal library error, reap\n"));
exit(EXIT_FAILURE);
}
- processes = xcalloc(pidread->counts.total, sizeof(void*));
- for (i = 0; i < pidread->counts.total; i++) {
+ processes = xcalloc(pidread->counts->total, sizeof(void*));
+ for (i = 0; i < pidread->counts->total; i++) {
buf = pidread->stacks[i];
value_this_proc_pcpu(buf);
if (want_this_proc(buf))
static int Pids_itms_cur; // 'current' max (<= Fieldstab)
static enum pids_item *Pids_itms; // allocated as MAXTBL(Fieldstab)
static struct pids_fetch *Pids_reap; // for reap or select
-#define PIDSmaxt Pids_reap->counts.total // just a little less wordy
+#define PIDSmaxt Pids_reap->counts->total // just a little less wordy
// pid stack results extractor macro, where e=our EU enum, t=type, s=stack
// ( we'll exploit that <proc/pids.h> provided macro as much as possible )
// ( but many functions use their own unique tailored version for access )
static void procs_refresh (void) {
#define nALIGN(n,m) (((n + m - 1) / m) * m) // unconditionally align
#define nALGN2(n,m) ((n + m - 1) & ~(m - 1)) // with power of 2 align
- #define n_reap Pids_reap->counts.total
+ #define n_reap Pids_reap->counts->total
static double uptime_sav;
static int n_alloc = -1; // size of windows stacks arrays
double uptime_cur;
if (isROOM(View_STATES, 2)) {
show_special(0, fmtmk(N_unq(STATE_line_1_fmt)
, Thread_mode ? N_txt(WORD_threads_txt) : N_txt(WORD_process_txt)
- , PIDSmaxt, Pids_reap->counts.running, Pids_reap->counts.sleeping
- , Pids_reap->counts.stopped, Pids_reap->counts.zombied));
+ , PIDSmaxt, Pids_reap->counts->running, Pids_reap->counts->sleeping
+ , Pids_reap->counts->stopped, Pids_reap->counts->zombied));
Msg_row += 1;
cpus_refresh();