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>
This commit is contained in:
Jim Warner
2021-09-18 00:00:00 -05:00
committed by Craig Small
parent 1d1c1b84df
commit b4b68f11d6
2 changed files with 81 additions and 71 deletions

View File

@@ -628,9 +628,9 @@ typedef struct WIN_t {
//atic inline void widths_resize (void);
//atic void zap_fieldstab (void);
/*------ Library Interface ---------------------------------------------*/
//atic void cpus_refresh (void);
//atic void procs_refresh (void);
//atic void sysinfo_refresh (int forced);
//atic void *cpus_refresh (void *unused);
//atic void *memory_refresh (void *unused);
//atic void *tasks_refresh (void *unused);
/*------ Inspect Other Output ------------------------------------------*/
//atic void insp_cnt_nl (void);
#ifndef INSP_OFFDEMO