From 6b6ad95f40f2e3129e21be40ba9fd2cddba6dfcf Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Sat, 6 Aug 2016 13:13:13 -0500 Subject: [PATCH] top: ensure derived VAL macro management is consistent With this patch, top has ensured that base library VAL macros are never found inside function bodies. Rather, they are used solely to support global derived macros. Program functions remain free to further tailor macros but they'll now always be based on the top derivative. Signed-off-by: Jim Warner --- top/top.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/top/top.c b/top/top.c index a977ffb2..aecee67f 100644 --- a/top/top.c +++ b/top/top.c @@ -233,6 +233,7 @@ enum Rel_statitems { // cpu/node stack results extractor macros, where e=rel enum, x=index #define CPU_VAL(e,x) STAT_VAL(e, s_int, Stat_reap->cpus->stacks[x], Stat_ctx) #define NOD_VAL(e,x) STAT_VAL(e, s_int, Stat_reap->nodes->stacks[x], Stat_ctx) +#define TIC_VAL(e,s) STAT_VAL(e, sl_int, s, Stat_ctx) /*###### Tiny useful routine(s) ########################################*/ @@ -4611,7 +4612,7 @@ all_done: * display and thus requiring the cpu summary toggle */ static void summary_hlp (struct stat_stack *this, const char *pfx) { // a tailored 'results stack value' extractor macro - #define rSv(E) STAT_VAL(E, sl_int, this, Stat_ctx) + #define rSv(E) TIC_VAL(E, this) SIC_t u_frme, s_frme, n_frme, i_frme, w_frme, x_frme, y_frme, z_frme, tot_frme; float scale;