From: Jim Warner Date: Wed, 26 Aug 2015 05:00:00 +0000 (-0500) Subject: library: introduce pids 'value extractor' helper macro X-Git-Tag: v4.0.0~1064 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=272081cbe6f9a7062a5483c505a367997fa614b7;p=procps-ng 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 --- 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,