]> granicus.if.org Git - procps-ng/commit
library: extend 'noop' concept to a resettable 'extra'
authorJim Warner <james.warner@comcast.net>
Thu, 3 Sep 2015 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@enc.com.au>
Sun, 6 Sep 2015 11:57:49 +0000 (21:57 +1000)
commit07ec0b4e090e1740d451a5fb7c31bc853ac01db3
tree05944a70491bfc72cfa964aea4b474722908e135
parentb2853ed1170ff900100fa69fee5a8dfd728bd120
library: extend 'noop' concept to a resettable 'extra'

The presence of that PROCPS_PIDS_noop may yet see some
use in the future with its 'no alter' library promise.

However, when top used that item to reflect the forest
view nesting level, the unchanging nature of that item
became more of an inconvenience than benefit. For each
refresh top was forced to loop through all the stacks,
resetting that PROCPS_PIDS_noop result struct to zero.

So this commit will now offer users a choice between a
new re-initialized item (PROCPS_PIDS_extra) & the noop
invariant.  Since the library already resets all those
result structures, top will now utilize it at no cost.

Signed-off-by: Jim Warner <james.warner@comcast.net>
proc/pids.h