[users at i-scream] Reentrancy for libstatgrab
rehsack at googlemail.com
Fri Nov 12 20:00:05 GMT 2010
as announced I've started to rewrite the stat-calls of libstatgrab to
A current snapshot (doesn't compile!) for reviewing the code of the changes can
be found at http://www.netbsd.org/~sno/smart-snmpd/.
Following changes has been made (and are planned for the remaining stats):
- introduce get_<xxx>_stats_r for each get_<xxx>_stats function guided by the
design of getaddrinfo(3) in the POSIX.2001 XPG6 libc standard.
- introduce get_<xxx>_diff_between(cur, last) for each get_<xxx>_diff
function guided by the getaddrinfo design
- rewrite the get_<xxx>_stats to use thread-local variables instead of static
globals when enabled thread-safety in ./configure
- introduce a free_<xxx>_stats() calls to free the resources got from *_r() or
Already rewritten statistics are the cpu-stats and disk/fs-stats and
the error handling.
vector.c has been updated to the new requirements and some functions in tools.c
are touched, too. Newly introduced global.c for component management shall
care about required space in TLS.
I threw a look over win32.c, but was completely unsure about the impact so far.
Any comments, objections or feedback for the current development way?
More information about the users