library: implement task/thread support via the new api
This commit is the culmination of efforts to modernize the library api. It should be treated as a first blush attempt, especially since I have absolutely no library design experience. But I did have a very strong desire to lessen the new library's impact on the top program. Under this new api, a 'stack' is the equivalent of the old proc_t. It can be seen as a variable length record whose contents & order is under complete user control. That initial stack/record configuration is established at procps_pids_new() time and will probably serve most program needs. But, a dynamic & demanding program like top will later change a stack via procps_pids_reset(). For programs like top & ps, procps_pids_reap() will be the function that will retrieve all tasks and threads. Any program that needs to filter / select only certain processes or users have available other functions that can be used: procps_pids_stacks_alloc, fill & dealloc. This implementation attempts to maximize that existing proven libprocps code base. As we gain more experience such actual code can be migrated into the pids.c file. Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
@ -42,6 +42,15 @@ global:
|
||||
procps_meminfo_getstack;
|
||||
procps_meminfo_stack_fill;
|
||||
procps_meminfo_stack_alloc;
|
||||
procps_pids_new;
|
||||
procps_pids_reap;
|
||||
procps_pids_ref;
|
||||
procps_pids_reset;
|
||||
procps_pids_stacks_alloc;
|
||||
procps_pids_stacks_dealloc;
|
||||
procps_pids_stacks_fill;
|
||||
procps_pids_stacks_sort;
|
||||
procps_pids_unref;
|
||||
procps_slabinfo_new;
|
||||
procps_slabinfo_read;
|
||||
procps_slabinfo_ref;
|
||||
|
Reference in New Issue
Block a user