diff options
author | Mitchell Horne <mhorne@FreeBSD.org> | 2022-06-21 13:22:26 -0300 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-03-07 07:30:44 +0100 |
commit | 2bac3364d2367c606f1bb0e06075474d3dfcb16b (patch) | |
tree | 3f7bd10e01fa3b43ad1d4c51bc951171fa3e590a /cpukit/score | |
parent | kern_tc.c/cputick2usec() (diff) | |
download | rtems-2bac3364d2367c606f1bb0e06075474d3dfcb16b.tar.bz2 |
set_cputicker: use a bool
The third argument to this function indicates whether the supplied
ticker is fixed or variable, i.e. requiring calibration. Give this
argument a type and name that better conveys this purpose.
Reviewed by: kib, markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35459
Diffstat (limited to 'cpukit/score')
-rw-r--r-- | cpukit/score/src/kern_tc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c index 8e43169934..92da675172 100644 --- a/cpukit/score/src/kern_tc.c +++ b/cpukit/score/src/kern_tc.c @@ -2497,7 +2497,7 @@ SYSINIT(timecounter, SI_SUB_CLOCKS, SI_ORDER_SECOND, inittimecounter, NULL); /* Cpu tick handling -------------------------------------------------*/ -static int cpu_tick_variable; +static bool cpu_tick_variable; static uint64_t cpu_tick_frequency; DPCPU_DEFINE_STATIC(uint64_t, tc_cpu_ticks_base); @@ -2590,14 +2590,14 @@ cpu_tick_calibrate(int reset) } void -set_cputicker(cpu_tick_f *func, uint64_t freq, unsigned var) +set_cputicker(cpu_tick_f *func, uint64_t freq, bool isvariable) { if (func == NULL) { cpu_ticks = tc_cpu_ticks; } else { cpu_tick_frequency = freq; - cpu_tick_variable = var; + cpu_tick_variable = isvariable; cpu_ticks = func; } } |