misc: adapt others to struct layout change, <PIDS> api

With the change to struct pids_fetch, we'll just trade
some dot ('.') code for some pointer to ('->') syntax.

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner
2016-06-23 00:00:00 -05:00
committed by Craig Small
parent 380253ff7f
commit a2c79b6237
4 changed files with 15 additions and 15 deletions

View File

@ -214,7 +214,7 @@ static struct procps_pidsinfo *Pids_ctx;
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 )
@ -2190,7 +2190,7 @@ static void cpus_refresh (void) {
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;
@ -4681,8 +4681,8 @@ static void summary_show (void) {
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();