libbb: use a wrapper around sysconf(_SC_CLK_TCK) to save a few bytes
function old new delta bb_sc_clk_tck - 10 +10 timescmd 118 113 -5 print_route 1763 1758 -5 mpstat_main 1288 1283 -5 iostat_main 1947 1942 -5 INET_setroute 879 871 -8 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/5 up/down: 10/-28) Total: -18 bytes Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
committed by
Denys Vlasenko
parent
f92f1d0181
commit
5d2e409ef8
@@ -109,11 +109,6 @@ enum {
|
||||
OPT_m = 1 << 5,
|
||||
};
|
||||
|
||||
static ALWAYS_INLINE unsigned get_user_hz(void)
|
||||
{
|
||||
return sysconf(_SC_CLK_TCK);
|
||||
}
|
||||
|
||||
static ALWAYS_INLINE int this_is_smp(void)
|
||||
{
|
||||
return (G.total_cpus > 1);
|
||||
@@ -414,7 +409,7 @@ int iostat_main(int argc UNUSED_PARAM, char **argv)
|
||||
memset(&stats_data, 0, sizeof(stats_data));
|
||||
|
||||
/* Get number of clock ticks per sec */
|
||||
G.clk_tck = get_user_hz();
|
||||
G.clk_tck = bb_clk_tck();
|
||||
|
||||
/* Determine number of CPUs */
|
||||
G.total_cpus = get_cpu_count();
|
||||
|
Reference in New Issue
Block a user