clock: remove z_ from semi-public APIs

The clock/timer APIs are not application facing APIs, however, similar
to arch_ and a few other APIs they are available to implement drivers
and add support for new hardware and are documented and available to be
used outside of the clock/kernel subsystems.

Remove the leading z_ and provide them as clock_* APIs for someone
writing a new timer driver to use.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2021-02-25 15:33:15 -05:00
commit 9c1efe6b4b
33 changed files with 171 additions and 168 deletions

View file

@ -43,10 +43,10 @@ static void arm_arch_timer_compare_isr(const void *arg)
k_spin_unlock(&lock, key);
z_clock_announce(IS_ENABLED(CONFIG_TICKLESS_KERNEL) ? delta_ticks : 1);
sys_clock_announce(IS_ENABLED(CONFIG_TICKLESS_KERNEL) ? delta_ticks : 1);
}
int z_clock_driver_init(const struct device *device)
int sys_clock_driver_init(const struct device *device)
{
ARG_UNUSED(device);
@ -61,7 +61,7 @@ int z_clock_driver_init(const struct device *device)
return 0;
}
void z_clock_set_timeout(int32_t ticks, bool idle)
void sys_clock_set_timeout(int32_t ticks, bool idle)
{
#if defined(CONFIG_TICKLESS_KERNEL)
@ -95,7 +95,7 @@ void z_clock_set_timeout(int32_t ticks, bool idle)
#endif
}
uint32_t z_clock_elapsed(void)
uint32_t sys_clock_elapsed(void)
{
if (!IS_ENABLED(CONFIG_TICKLESS_KERNEL)) {
return 0;