library: overcome effect of copy/paste, <SLABINFO> api

Needless to say, when one copies and then pastes, it's
always better when those results are refined somewhat.

The qsort callback declarations used the wrong results
type and 2 of their 3 input parameters were wrong too.

So this patch will fix that & generalize declarations.

[ plus add comment guidance about noop & extra enums ]
[ & provide for 'noop' sorting, as is done in <PIDS> ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner
2016-06-09 00:00:00 -05:00
committed by Craig Small
parent f897a495ee
commit 6a70466ae5
2 changed files with 42 additions and 36 deletions

View File

@@ -28,8 +28,8 @@
__BEGIN_DECLS
enum slabinfo_item {
PROCPS_SLABINFO_noop, // n/a
PROCPS_SLABINFO_extra, // n/a
PROCPS_SLABINFO_noop, // ( never altered )
PROCPS_SLABINFO_extra, // ( reset to zero )
PROCPS_SLABS_OBJS, // u_int
PROCPS_SLABS_AOBJS, // u_int