zephyr/kernel
Andrew Boie fd49cf7d02 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>
2019-05-22 23:33:55 +02:00
..
include misc: Replace uses of __builtin_*_overflow() with <misc/math_extras.h>. 2019-05-14 19:53:30 -05:00
atomic_c.c kernel: fix atomic ops in user mode on some arches 2019-03-18 09:18:00 -04:00
CMakeLists.txt license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
compiler_stack_protect.c all: Update reserved function names 2019-03-11 13:48:42 -04:00
device.c all: Add 'U' suffix when using unsigned variables 2019-03-28 17:15:58 -05:00
errno.c all: Update reserved function names 2019-03-11 13:48:42 -04:00
idle.c power: clean up system power managment function names 2019-03-26 13:27:55 -04:00
init.c kernel: demote K_THREAD_STACK_BUFFER() to private 2019-04-05 16:10:02 -04:00
int_latency_bench.c all: Add 'U' suffix when using unsigned variables 2019-03-28 17:15:58 -05:00
Kconfig kernel: Fix usage of CONFIG_SYS_CLOCK_EXISTS 2019-05-15 10:44:59 +02:00
Kconfig.power_mgmt power: modify HAS_STATE_SLEEP_ Kconfig options 2019-03-26 13:27:55 -04:00
mailbox.c all: Add 'U' suffix when using unsigned variables 2019-03-28 17:15:58 -05:00
mem_domain.c kernel: mem_domain: update name/doc of API function for partition add 2019-05-02 11:37:38 -04:00
mem_slab.c all: Add 'U' suffix when using unsigned variables 2019-03-28 17:15:58 -05:00
mempool.c misc: Replace uses of __builtin_*_overflow() with <misc/math_extras.h>. 2019-05-14 19:53:30 -05:00
msg_q.c misc: Replace uses of __builtin_*_overflow() with <misc/math_extras.h>. 2019-05-14 19:53:30 -05:00
mutex.c all: Add 'U' suffix when using unsigned variables 2019-03-28 17:15:58 -05:00
pipes.c all: Add 'U' suffix when using unsigned variables 2019-03-28 17:15:58 -05:00
poll.c misc: Replace uses of __builtin_*_overflow() with <misc/math_extras.h>. 2019-05-14 19:53:30 -05:00
queue.c all: Update reserved function names 2019-03-11 13:48:42 -04:00
sched.c kernel/sched.c: add k_usleep() API function 2019-05-21 23:09:16 -04:00
sem.c all: Update reserved function names 2019-03-11 13:48:42 -04:00
smp.c kernel/sched: arch/x86_64: Support synchronous k_thread_abort() in SMP 2019-03-13 19:15:20 +01:00
stack.c kernel: fix k_stack_alloc_init() 2019-05-06 19:47:01 -04:00
system_work_q.c kernel: system_work_q: Set dedicated "sysworkq" name. 2018-10-19 07:58:45 -04:00
thread_abort.c all: Add 'U' suffix when using unsigned variables 2019-03-28 17:15:58 -05:00
thread.c misc: Replace uses of __builtin_*_overflow() with <misc/math_extras.h>. 2019-05-14 19:53:30 -05:00
timeout.c kernel: timeout: add syscall for runtime clk freq 2019-05-22 23:33:55 +02:00
timer.c all: Add 'U' suffix when using unsigned variables 2019-03-28 17:15:58 -05:00
userspace_handler.c all: Update reserved function names 2019-03-11 13:48:42 -04:00
userspace.c misc: Replace uses of __builtin_*_overflow() with <misc/math_extras.h>. 2019-05-14 19:53:30 -05:00
version.c doc: add kernel version API to doxygen 2018-12-08 17:24:53 -05:00
work_q.c kernel: Fix usage of CONFIG_SYS_CLOCK_EXISTS 2019-05-15 10:44:59 +02:00