library: sysstat and vmstat api changes

Use the standard libc declarations.
For protecting the headers for C++ procps used to have its
own defines, this change makes them use the standard libc ones.

getstat() -> procps_stat_*
vminfo() -> procps_vmstat_*
These two components of the library now use the newer version of
the API with less exposed global variables. The old methods are
there for now.

Signed-off-by: Craig Small <csmall@enc.com.au>
This commit is contained in:
Craig Small
2015-06-20 07:43:02 +10:00
parent 6a0850be7b
commit a410e236ab
18 changed files with 600 additions and 106 deletions

View File

@ -10,13 +10,13 @@
// in the file COPYING
#include "procps.h"
#include "pwcache.h"
#include <proc/procps.h>
#include <proc/pwcache.h>
#define SIGNAL_STRING
#define QUICK_THREADS /* copy (vs. read) some thread info from parent proc_t */
EXTERN_C_BEGIN
__BEGIN_DECLS
// ld cutime, cstime, priority, nice, timeout, alarm, rss,
// c state,
@ -311,5 +311,5 @@ extern proc_t * get_proc_stats(pid_t pid, proc_t *p);
#define PROC_SPARE_3 0x04000000
#define PROC_SPARE_4 0x08000000
EXTERN_C_END
__END_DECLS
#endif