From a387221f3c99485877c63dc7cdce7530e205bcaf Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Sat, 13 Mar 2021 08:16:53 -0500 Subject: [PATCH] clock: rename z_clock_hw_cycles_per_sec_runtime_get Do not use z_ for internal APIs, z_ is for private APIs within one subsystem only. Signed-off-by: Anas Nashif --- include/sys/time_units.h | 6 +++--- kernel/timeout.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/sys/time_units.h b/include/sys/time_units.h index a481b548cf1..0ed0f8438ee 100644 --- a/include/sys/time_units.h +++ b/include/sys/time_units.h @@ -27,9 +27,9 @@ extern "C" { /* Exhaustively enumerated, highly optimized time unit conversion API */ #if defined(CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME) -__syscall int z_clock_hw_cycles_per_sec_runtime_get(void); +__syscall int sys_clock_hw_cycles_per_sec_runtime_get(void); -static inline int z_impl_z_clock_hw_cycles_per_sec_runtime_get(void) +static inline int z_impl_sys_clock_hw_cycles_per_sec_runtime_get(void) { extern int z_clock_hw_cycles_per_sec; @@ -50,7 +50,7 @@ static inline int z_impl_z_clock_hw_cycles_per_sec_runtime_get(void) static TIME_CONSTEXPR inline int sys_clock_hw_cycles_per_sec(void) { #if defined(CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME) - return z_clock_hw_cycles_per_sec_runtime_get(); + return sys_clock_hw_cycles_per_sec_runtime_get(); #else return CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC; #endif diff --git a/kernel/timeout.c b/kernel/timeout.c index a0182824908..79262db5700 100644 --- a/kernel/timeout.c +++ b/kernel/timeout.c @@ -28,11 +28,11 @@ static int announce_remaining; int z_clock_hw_cycles_per_sec = CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC; #ifdef CONFIG_USERSPACE -static inline int z_vrfy_z_clock_hw_cycles_per_sec_runtime_get(void) +static inline int z_vrfy_sys_clock_hw_cycles_per_sec_runtime_get(void) { - return z_impl_z_clock_hw_cycles_per_sec_runtime_get(); + return z_impl_sys_clock_hw_cycles_per_sec_runtime_get(); } -#include +#include #endif /* CONFIG_USERSPACE */ #endif /* CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME */