library: more pids_fetch struct opaqueness, <PIDS> api
With all our 3rd generation interfaces, we're now well positioned to preserve binary compatibility should new fields be added to any public structure (assuming that the 'result' union already contains its largest type). This remains true even for the <pids> interface, which unlike the others, has one structure embedded within a separate struct rather than declaring a pointer to it. The counts struct was positioned after the stacks ptrs array so as to preserve that ABI if ever new ints were added. Logically, however, the counts (especially that total) should precede the stacks array if we wished to properly place a horse (total) before a cart (stacks). So to enable relocating those counts we will no longer embed that structure, but provide a pointer to it. And this will make accessing syntax feel more natural too. Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
@ -23,7 +23,6 @@
|
||||
#ifndef _PROC_PIDS_H
|
||||
#define _PROC_PIDS_H
|
||||
|
||||
#include <features.h>
|
||||
__BEGIN_DECLS
|
||||
|
||||
enum pids_item {
|
||||
@ -187,8 +186,8 @@ struct pids_counts {
|
||||
};
|
||||
|
||||
struct pids_fetch {
|
||||
struct pids_counts *counts;
|
||||
struct pids_stack **stacks;
|
||||
struct pids_counts counts;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user