aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
Diffstat (limited to 'procps')
-rw-r--r--procps/iostat.c7
-rw-r--r--procps/mpstat.c8
2 files changed, 2 insertions, 13 deletions
diff --git a/procps/iostat.c b/procps/iostat.c
index 978d23430..8d272c87c 100644
--- a/procps/iostat.c
+++ b/procps/iostat.c
@@ -109,11 +109,6 @@ enum {
109 OPT_m = 1 << 5, 109 OPT_m = 1 << 5,
110}; 110};
111 111
112static ALWAYS_INLINE unsigned get_user_hz(void)
113{
114 return sysconf(_SC_CLK_TCK);
115}
116
117static ALWAYS_INLINE int this_is_smp(void) 112static ALWAYS_INLINE int this_is_smp(void)
118{ 113{
119 return (G.total_cpus > 1); 114 return (G.total_cpus > 1);
@@ -414,7 +409,7 @@ int iostat_main(int argc UNUSED_PARAM, char **argv)
414 memset(&stats_data, 0, sizeof(stats_data)); 409 memset(&stats_data, 0, sizeof(stats_data));
415 410
416 /* Get number of clock ticks per sec */ 411 /* Get number of clock ticks per sec */
417 G.clk_tck = get_user_hz(); 412 G.clk_tck = bb_clk_tck();
418 413
419 /* Determine number of CPUs */ 414 /* Determine number of CPUs */
420 G.total_cpus = get_cpu_count(); 415 G.total_cpus = get_cpu_count();
diff --git a/procps/mpstat.c b/procps/mpstat.c
index aa5a5c73f..c628d6215 100644
--- a/procps/mpstat.c
+++ b/procps/mpstat.c
@@ -775,12 +775,6 @@ static void main_loop(void)
775 775
776/* Initialization */ 776/* Initialization */
777 777
778/* Get number of clock ticks per sec */
779static ALWAYS_INLINE unsigned get_hz(void)
780{
781 return sysconf(_SC_CLK_TCK);
782}
783
784static void alloc_struct(int cpus) 778static void alloc_struct(int cpus)
785{ 779{
786 int i; 780 int i;
@@ -873,7 +867,7 @@ int mpstat_main(int UNUSED_PARAM argc, char **argv)
873 G.cpu_nr = get_cpu_count(); 867 G.cpu_nr = get_cpu_count();
874 868
875 /* Get number of clock ticks per sec */ 869 /* Get number of clock ticks per sec */
876 G.hz = get_hz(); 870 G.hz = bb_clk_tck();
877 871
878 /* Calculate number of interrupts per processor */ 872 /* Calculate number of interrupts per processor */
879 G.irqcpu_nr = get_irqcpu_nr(PROCFS_INTERRUPTS, NR_IRQS) + NR_IRQCPU_PREALLOC; 873 G.irqcpu_nr = get_irqcpu_nr(PROCFS_INTERRUPTS, NR_IRQS) + NR_IRQCPU_PREALLOC;