library: the overlooked twerks (oops, tweaks), 3rd gen
Yes, all of these changes are strictly cosmetic. It is likely symptomatic of some deep-seated character flaw. [ or, it might be because of a certain pride in this ] [ new library and the desire to make it even better! ] Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
parent
a6115bfff4
commit
9bea1b2def
@ -386,8 +386,8 @@ static inline void cleanup_stack (
|
|||||||
static inline void cleanup_stacks_all (
|
static inline void cleanup_stacks_all (
|
||||||
struct procps_meminfo *info)
|
struct procps_meminfo *info)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
struct stacks_extent *ext = info->extents;
|
struct stacks_extent *ext = info->extents;
|
||||||
|
int i;
|
||||||
|
|
||||||
while (ext) {
|
while (ext) {
|
||||||
for (i = 0; ext->stacks[i]; i++)
|
for (i = 0; ext->stacks[i]; i++)
|
||||||
|
15
proc/pids.c
15
proc/pids.c
@ -263,7 +263,7 @@ setDECL(WCHAN_NAME) { (void)I; R->result.str = strdup(lookup_wchan(P->tid)); }
|
|||||||
|
|
||||||
// ___ Free Storage Support |||||||||||||||||||||||||||||||||||||||||||||||||||
|
// ___ Free Storage Support |||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||
|
|
||||||
#define freNAME(e) free_results_ ## e
|
#define freNAME(t) free_results_ ## t
|
||||||
|
|
||||||
static void freNAME(str) (struct pids_result *R) {
|
static void freNAME(str) (struct pids_result *R) {
|
||||||
if (R->result.str) free(R->result.str);
|
if (R->result.str) free(R->result.str);
|
||||||
@ -365,7 +365,7 @@ typedef void (*FRE_t)(struct pids_result *);
|
|||||||
typedef int (*QSR_t)(const void *, const void *, void *);
|
typedef int (*QSR_t)(const void *, const void *, void *);
|
||||||
|
|
||||||
#define RS(e) (SET_t)setNAME(e)
|
#define RS(e) (SET_t)setNAME(e)
|
||||||
#define FF(e) (FRE_t)freNAME(e)
|
#define FF(t) (FRE_t)freNAME(t)
|
||||||
#define QS(t) (QSR_t)srtNAME(t)
|
#define QS(t) (QSR_t)srtNAME(t)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -505,7 +505,8 @@ static struct {
|
|||||||
{ NULL, 0, NULL, NULL, 0 }
|
{ NULL, 0, NULL, NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
// next MUST be kept in sync with highest value enum
|
/* please note,
|
||||||
|
* this enum MUST be 1 greater than the highest value of any enum */
|
||||||
enum pids_item PROCPS_PIDS_logical_end = PROCPS_PIDS_WCHAN_NAME + 1;
|
enum pids_item PROCPS_PIDS_logical_end = PROCPS_PIDS_WCHAN_NAME + 1;
|
||||||
|
|
||||||
#undef setNAME
|
#undef setNAME
|
||||||
@ -590,7 +591,8 @@ static inline HST_t *histget (
|
|||||||
while (-1 < V) {
|
while (-1 < V) {
|
||||||
if (Hr(PHist_sav[V].pid) == pid)
|
if (Hr(PHist_sav[V].pid) == pid)
|
||||||
return &Hr(PHist_sav[V]);
|
return &Hr(PHist_sav[V]);
|
||||||
V = Hr(PHist_sav[V].lnk); }
|
V = Hr(PHist_sav[V].lnk);
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
} // end: histget
|
} // end: histget
|
||||||
|
|
||||||
@ -869,7 +871,7 @@ static void itemize_stacks_all (
|
|||||||
ext = ext->next;
|
ext = ext->next;
|
||||||
};
|
};
|
||||||
info->dirty_stacks = 0;
|
info->dirty_stacks = 0;
|
||||||
}
|
} // end: itemize_stacks_all
|
||||||
|
|
||||||
|
|
||||||
static inline int items_check_failed (
|
static inline int items_check_failed (
|
||||||
@ -950,7 +952,6 @@ static inline int oldproc_open (
|
|||||||
if (NULL == (*this = openproc(flags, ids, num)))
|
if (NULL == (*this = openproc(flags, ids, num)))
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
} // end: oldproc_open
|
} // end: oldproc_open
|
||||||
|
|
||||||
@ -1437,7 +1438,7 @@ PROCPS_EXPORT struct pids_fetch *procps_pids_select (
|
|||||||
/*
|
/*
|
||||||
* procps_pids_sort():
|
* procps_pids_sort():
|
||||||
*
|
*
|
||||||
* Sort stacks anchored in the passed pids_stack pointers array
|
* Sort stacks anchored in the passed stack pointers array
|
||||||
* based on the designated sort enumerator and specified order.
|
* based on the designated sort enumerator and specified order.
|
||||||
*
|
*
|
||||||
* Returns those same addresses sorted.
|
* Returns those same addresses sorted.
|
||||||
|
@ -536,8 +536,8 @@ static inline void cleanup_stack (
|
|||||||
static inline void cleanup_stacks_all (
|
static inline void cleanup_stacks_all (
|
||||||
struct ext_support *this)
|
struct ext_support *this)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
struct stacks_extent *ext = this->extents;
|
struct stacks_extent *ext = this->extents;
|
||||||
|
int i;
|
||||||
|
|
||||||
while (ext) {
|
while (ext) {
|
||||||
for (i = 0; ext->stacks[i]; i++)
|
for (i = 0; ext->stacks[i]; i++)
|
||||||
@ -958,8 +958,8 @@ PROCPS_EXPORT struct slabinfo_stack *procps_slabinfo_select (
|
|||||||
/*
|
/*
|
||||||
* procps_slabinfo_sort():
|
* procps_slabinfo_sort():
|
||||||
*
|
*
|
||||||
* Sort stacks anchored as 'heads' in the passed slabinfo_stack pointers
|
* Sort stacks anchored in the passed stack pointers array
|
||||||
* array based on the designated sort enumerator.
|
* based on the designated sort enumerator and specified order.
|
||||||
*
|
*
|
||||||
* Returns those same addresses sorted.
|
* Returns those same addresses sorted.
|
||||||
*
|
*
|
||||||
|
@ -751,8 +751,8 @@ static inline void cleanup_stack (
|
|||||||
static inline void cleanup_stacks_all (
|
static inline void cleanup_stacks_all (
|
||||||
struct procps_vmstat *info)
|
struct procps_vmstat *info)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
struct stacks_extent *ext = info->extents;
|
struct stacks_extent *ext = info->extents;
|
||||||
|
int i;
|
||||||
|
|
||||||
while (ext) {
|
while (ext) {
|
||||||
for (i = 0; ext->stacks[i]; i++)
|
for (i = 0; ext->stacks[i]; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user