diff options
author | Jim Warner <james.warner@comcast.net> | 2016-08-05 00:00:00 -0500 |
---|---|---|
committer | Craig Small <csmall@enc.com.au> | 2016-08-07 21:40:48 +1000 |
commit | e0515e23e718094d5651966f672aa241f53d9381 (patch) | |
tree | 76c3893f233b1df70cbd0f7af02f4d2fbf35d43d /w.c | |
parent | 6cafe3abecdfb758259fabe48b6e0e4b74cd484e (diff) | |
download | procps-ng-e0515e23e718094d5651966f672aa241f53d9381.tar.gz |
related: respond to VAL macro addition of context parm
Since the VAL macro now requires a 4th parameter, this
commit simply adds the 'info' context structure to it.
In some cases, that context structure needed to become
global, since it was referenced in multiple functions.
Signed-off-by: Jim Warner <james.warner@comcast.net>
Diffstat (limited to 'w.c')
-rw-r--r-- | w.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -343,9 +343,9 @@ static int find_best_proc( unsigned long long *restrict const pcpu, char *cmdline) { -#define PIDS_GETINT(e) PIDS_VAL(EU_ ## e, s_int, reap->stacks[i]) -#define PIDS_GETULL(e) PIDS_VAL(EU_ ## e, ull_int, reap->stacks[i]) -#define PIDS_GETSTR(e) PIDS_VAL(EU_ ## e, str, reap->stacks[i]) +#define PIDS_GETINT(e) PIDS_VAL(EU_ ## e, s_int, reap->stacks[i], info) +#define PIDS_GETULL(e) PIDS_VAL(EU_ ## e, ull_int, reap->stacks[i], info) +#define PIDS_GETSTR(e) PIDS_VAL(EU_ ## e, str, reap->stacks[i], info) unsigned uid = ~0U; int found_utpid = 0; int i, total_procs, line; @@ -404,7 +404,7 @@ static int find_best_proc( } if (PIDS_GETINT(TTY) != line) continue; - (*jcpu) += PIDS_VAL(EU_TICS_ALL, ull_int, reap->stacks[i]); + (*jcpu) += PIDS_VAL(EU_TICS_ALL, ull_int, reap->stacks[i], info); if (!(secondbest_time && PIDS_GETULL(START) <= secondbest_time)) { secondbest_time = PIDS_GETULL(START); if (cmdline[0] == '-' && cmdline[1] == '\0') { |