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: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2019-05-21 14:02:26 -07:00 committed by Carles Cufí
commit fd49cf7d02
3 changed files with 28 additions and 7 deletions

View file

@ -0,0 +1,3 @@
/*
* SPDX-License-Identifier: Apache-2.0
*/