related: change for lost 'PROCPS_' enumerator prefixes
With this patch we've completed a progression toward a standard approach to naming conventions which follows: * Only functions will begin with that 'procps_' prefix . ........................................... examples . procps_vmstat_get () . procps_diskstats_select () - ---------------------------------------------------- * Exposed structures begin with the module/header name . ........................................... examples . struct pids_info . struct stat_reaped - ---------------------------------------------------- * Item enumerators begin like structs, but capitalized . ........................................... examples . VMSTAT_COMPACT_FAIL . MEMINFO_DELTA_ACTIVE [ slabinfo varies slightly due to some item variants ] . SLABINFO_extra . SLABS_SIZE_ACTIVE . SLABNODE_OBJS_PER_SLAB [ could cure with a prefix of SLABINFO, but too long ] - ---------------------------------------------------- * Other enumerators work exactly like item enumerators . ........................................... examples . PIDS_SORT_ASCEND . STAT_REAP_CPUS_AND_NODES - ---------------------------------------------------- * Macros and constants begin just like the enumerators . ........................................... examples . #define SLABINFO_GET . #define DISKSTATS_TYPE_DISK - ---------------------------------------------------- Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
@ -34,13 +34,13 @@
|
||||
|
||||
/* a 'results stack value' extractor macro
|
||||
where: E=rel enum, T=data type, S=stack */
|
||||
#define rSv(E,T,S) PROCPS_PIDS_VAL(rel_ ## E, T, S)
|
||||
#define rSv(E,T,S) PIDS_VAL(rel_ ## E, T, S)
|
||||
|
||||
#define namREL(e) rel_ ## e
|
||||
#define makEXT(e) extern int namREL(e);
|
||||
#define makREL(e) int namREL(e) = -1;
|
||||
#define chkREL(e) if (namREL(e) < 0) { \
|
||||
Pids_items[Pids_index] = PROCPS_PIDS_ ## e; \
|
||||
Pids_items[Pids_index] = PIDS_ ## e; \
|
||||
namREL(e) = (Pids_index < PIDSITEMS) ? Pids_index++ : rel_noop; }
|
||||
|
||||
#define setREL1(e) { \
|
||||
|
Reference in New Issue
Block a user