]> granicus.if.org Git - procps-ng/commit
top: refactor 3 routines ahead of the separate threads
authorJim Warner <james.warner@comcast.net>
Sat, 18 Sep 2021 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@dropbear.xyz>
Mon, 20 Sep 2021 10:05:44 +0000 (20:05 +1000)
commitb4b68f11d63bb031ef3b6774c0704c0887cf20bb
tree6240054024a4f5749ab67729917571075daf4808
parent1d1c1b84dfcd1d61631be4c312bcf7aaf216ddc6
top: refactor 3 routines ahead of the separate threads

This commit sets the stage for turning three functions
into code that can support a separate thread to update
their respective data while working in the background.

It involved relocating 1 function, renaming 2 routines
and adding parameters plus return addresses to each of
three functions. Those latter changes will be required
when issuing 'pthread_create' calls in the next patch.

The final step was organizing this code into what will
become the infinite do-while loop supporting a thread.

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