[rtems commit] set_cputicker: use a bool
Sebastian Huber
sebh at rtems.org
Thu Mar 9 06:54:14 UTC 2023
Module: rtems
Branch: master
Commit: 2bac3364d2367c606f1bb0e06075474d3dfcb16b
Changeset: http://git.rtems.org/rtems/commit/?id=2bac3364d2367c606f1bb0e06075474d3dfcb16b
Author: Mitchell Horne <mhorne at FreeBSD.org>
Date: Tue Jun 21 13:22:26 2022 -0300
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
---
cpukit/score/src/kern_tc.c | 6 +++---
1 file 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;
}
}
More information about the vc
mailing list