Skip to content
Commit fd49cf7d authored by Andrew Boie's avatar Andrew Boie Committed by Carles Cufí
Browse files

kernel: timeout: add syscall for runtime clk freq



If the system sets its clock frequency at runtime, this is
stored in a variable that can't be directly read by user
mode. For this case only, add a system call to fetch its
value and modify the definition of
sys_clock_hw_cycles_per_sec() to use it.

Since this is now a system call, store in a temporary variable
inside z_ms_to_ticks(). The syscall overhead only applies
when called from user mode, other contexts are completely
inlined.

Added stub syscall header for mocking framework, to get rid
of inclusion errors.

Fixes: #16238

Signed-off-by: default avatarAndrew Boie <andrew.p.boie@intel.com>
parent e541b16c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment