procps/proc
Jim Warner ca30741a30 library: ensure thread safety via function substitutes
Even though we we had to abandon the master branch top
multi-thread effort and even though the newlib version
of a multi-threaded top provides no real benefit, that
whole exercise was not wasted. Rather, it has revealed
some deficiencies in our library which this addresses.

If two or more threads in the same address space tried
to use procps_loadavg or procps_uptime simultaneously,
there's a chance they would experience problems due to
thread-unsafe functions our library called internally.

So, this patch switches them for thread-safe versions.

[ along the way we will also make that procps_uptime ]
[ initialization of his 'up' & 'idle' variables mean ]
[ something by delaying the -ERANGE return a little. ]

Reference(s):
https://www.freelists.org/post/procps/a-few-more-patches,7

Signed-off-by: Jim Warner <james.warner@comcast.net>
2021-10-02 12:55:31 +10:00
..
.gitignore
COPYING
devname.c library: ensure thread safety for all static variables 2021-10-02 12:55:31 +10:00
devname.h
diskstats.c
diskstats.h
escape.c library: ensure thread safety for all static variables 2021-10-02 12:55:31 +10:00
escape.h
libproc-2.pc.in
libproc-2.sym
meminfo.c library: ensure thread safety for all static variables 2021-10-02 12:55:31 +10:00
meminfo.h
misc.h
namespace.c
numa.c
numa.h
pids.c library: ensure thread safety for all static variables 2021-10-02 12:55:31 +10:00
pids.h
procps-private.h
pwcache.c
pwcache.h
readproc.c library: ensure thread safety for all static variables 2021-10-02 12:55:31 +10:00
readproc.h
slabinfo.c library: ensure thread safety for all static variables 2021-10-02 12:55:31 +10:00
slabinfo.h
stat.c library: ensure thread safety for all static variables 2021-10-02 12:55:31 +10:00
stat.h
sysinfo.c library: ensure thread safety via function substitutes 2021-10-02 12:55:31 +10:00
test_Itemtables.c
test_namespace.c
test_pids.c
test_sysinfo.c
test_uptime.c
test_version.c
uptime.c library: ensure thread safety via function substitutes 2021-10-02 12:55:31 +10:00
version.c
vmstat.c library: ensure thread safety for all static variables 2021-10-02 12:55:31 +10:00
vmstat.h
wchan.c library: ensure thread safety for all static variables 2021-10-02 12:55:31 +10:00
wchan.h
xtra-procps-debug.h