From 272081cbe6f9a7062a5483c505a367997fa614b7 Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Wed, 26 Aug 2015 00:00:00 -0500 Subject: [PATCH] library: introduce pids 'value extractor' helper macro As an experiment a helper macro used to extract values from a result stack has been added to the header file. Don't force callers to reinvent that particular wheel. Signed-off-by: Jim Warner --- proc/pids.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proc/pids.h b/proc/pids.h index 6c56780a..35e3d1b8 100644 --- a/proc/pids.h +++ b/proc/pids.h @@ -190,6 +190,10 @@ struct pids_reap { }; +#define PROCPS_PIDS_VAL(rel_enum,type,stack) \ + stack -> head [ rel_enum ] . result . type + + int procps_pids_new ( struct procps_pidsinfo **info, int maxitems, -- 2.40.0