library: reposition those 'info' structures in headers

For some unknown reason all the 'info' structures were
declared between macros and function prototypes rather
than right after all the other structure declarations.

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2021-12-15 00:00:00 -06:00 committed by Craig Small
parent 957b74292f
commit b2c4fcfddb
6 changed files with 12 additions and 12 deletions

View File

@ -86,6 +86,8 @@ struct diskstats_reaped {
struct diskstats_stack **stacks; struct diskstats_stack **stacks;
}; };
struct diskstats_info;
#define DISKSTATS_TYPE_DISK -11111 #define DISKSTATS_TYPE_DISK -11111
#define DISKSTATS_TYPE_PARTITION -22222 #define DISKSTATS_TYPE_PARTITION -22222
@ -98,8 +100,6 @@ struct diskstats_reaped {
stack -> head [ relative_enum ] . result . type stack -> head [ relative_enum ] . result . type
struct diskstats_info;
int procps_diskstats_new (struct diskstats_info **info); int procps_diskstats_new (struct diskstats_info **info);
int procps_diskstats_ref (struct diskstats_info *info); int procps_diskstats_ref (struct diskstats_info *info);
int procps_diskstats_unref (struct diskstats_info **info); int procps_diskstats_unref (struct diskstats_info **info);

View File

@ -182,6 +182,8 @@ struct meminfo_stack {
struct meminfo_result *head; struct meminfo_result *head;
}; };
struct meminfo_info;
#define MEMINFO_GET( info, actual_enum, type ) ( { \ #define MEMINFO_GET( info, actual_enum, type ) ( { \
struct meminfo_result *r = procps_meminfo_get( info, actual_enum ); \ struct meminfo_result *r = procps_meminfo_get( info, actual_enum ); \
@ -191,8 +193,6 @@ struct meminfo_stack {
stack -> head [ relative_enum ] . result . type stack -> head [ relative_enum ] . result . type
struct meminfo_info;
int procps_meminfo_new (struct meminfo_info **info); int procps_meminfo_new (struct meminfo_info **info);
int procps_meminfo_ref (struct meminfo_info *info); int procps_meminfo_ref (struct meminfo_info *info);
int procps_meminfo_unref (struct meminfo_info **info); int procps_meminfo_unref (struct meminfo_info **info);

View File

@ -228,13 +228,13 @@ struct pids_fetch {
struct pids_stack **stacks; struct pids_stack **stacks;
}; };
struct pids_info;
#define PIDS_VAL( relative_enum, type, stack, info ) \ #define PIDS_VAL( relative_enum, type, stack, info ) \
stack -> head [ relative_enum ] . result . type stack -> head [ relative_enum ] . result . type
struct pids_info;
int procps_pids_new (struct pids_info **info, enum pids_item *items, int numitems); int procps_pids_new (struct pids_info **info, enum pids_item *items, int numitems);
int procps_pids_ref (struct pids_info *info); int procps_pids_ref (struct pids_info *info);
int procps_pids_unref (struct pids_info **info); int procps_pids_unref (struct pids_info **info);

View File

@ -95,6 +95,8 @@ struct slabinfo_reaped {
struct slabinfo_stack **stacks; struct slabinfo_stack **stacks;
}; };
struct slabinfo_info;
#define SLABINFO_GET( info, actual_enum, type ) ( { \ #define SLABINFO_GET( info, actual_enum, type ) ( { \
struct slabinfo_result *r = procps_slabinfo_get( info, actual_enum ); \ struct slabinfo_result *r = procps_slabinfo_get( info, actual_enum ); \
@ -104,8 +106,6 @@ struct slabinfo_reaped {
stack -> head [ relative_enum ] . result . type stack -> head [ relative_enum ] . result . type
struct slabinfo_info;
int procps_slabinfo_new (struct slabinfo_info **info); int procps_slabinfo_new (struct slabinfo_info **info);
int procps_slabinfo_ref (struct slabinfo_info *info); int procps_slabinfo_ref (struct slabinfo_info *info);
int procps_slabinfo_unref (struct slabinfo_info **info); int procps_slabinfo_unref (struct slabinfo_info **info);

View File

@ -119,6 +119,8 @@ struct stat_reaped {
struct stat_reap *numa; struct stat_reap *numa;
}; };
struct stat_info;
// STAT_TIC_ID value for /proc/stat cpu summary // STAT_TIC_ID value for /proc/stat cpu summary
#define STAT_SUMMARY_ID -11111 #define STAT_SUMMARY_ID -11111
@ -135,8 +137,6 @@ struct stat_reaped {
stack -> head [ relative_enum ] . result . type stack -> head [ relative_enum ] . result . type
struct stat_info;
int procps_stat_new (struct stat_info **info); int procps_stat_new (struct stat_info **info);
int procps_stat_ref (struct stat_info *info); int procps_stat_ref (struct stat_info *info);
int procps_stat_unref (struct stat_info **info); int procps_stat_unref (struct stat_info **info);

View File

@ -351,6 +351,8 @@ struct vmstat_stack {
struct vmstat_result *head; struct vmstat_result *head;
}; };
struct vmstat_info;
#define VMSTAT_GET( info, actual_enum, type ) ( { \ #define VMSTAT_GET( info, actual_enum, type ) ( { \
struct vmstat_result *r = procps_vmstat_get( info, actual_enum ); \ struct vmstat_result *r = procps_vmstat_get( info, actual_enum ); \
@ -360,8 +362,6 @@ struct vmstat_stack {
stack -> head [ relative_enum ] . result . type stack -> head [ relative_enum ] . result . type
struct vmstat_info;
int procps_vmstat_new (struct vmstat_info **info); int procps_vmstat_new (struct vmstat_info **info);
int procps_vmstat_ref (struct vmstat_info *info); int procps_vmstat_ref (struct vmstat_info *info);
int procps_vmstat_unref (struct vmstat_info **info); int procps_vmstat_unref (struct vmstat_info **info);