]> granicus.if.org Git - procps-ng/commit
top: utilize a library result struct for 'forest view'
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:58:27 +0000 (21:58 +1000)
commitbb04019510a97e7ead25892a62361ee51d552a3a
tree8d3d06aebd5e5152b8d0f17a38b669100cc139e3
parent07ec0b4e090e1740d451a5fb7c31bc853ac01db3
top: utilize a library result struct for 'forest view'

When top was originally adapted to use that <pids> API,
the forest view support was redesigned since the proc_t
pad_3 byte could no longer be employed to hold a task's
nesting level. The redesign required additional arrays.

Now that the dust is settling on those initial efforts,
that PROCPS_PIDS_noop item was used as a substitute for
the old pad_3 along with a return to the former design.
But, while it proved adequate, the invariant nature for
that item required of top an extra initialization step.

So the library was coaxed into adding one more pid_item
(PROCPS_PIDS_extra) which will, unlike that 'noop' guy,
be reset with each reap. Everybody should be happy now.

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