timer: legacy_api: Fix a build dependency in legacy_api header

z_timer_idle_enter is declared only when CONFIG_TICKLESS_IDLE is
selected. This function is not implemented anywhere, but the only
driver including this header is not TICKLESS_CAPABLE. So, no undefined
reference will happen.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2021-01-06 12:40:15 -08:00 committed by Anas Nashif
commit c408765d70

View file

@ -30,13 +30,13 @@ extern uint64_t z_clock_uptime(void);
void z_clock_set_timeout(int32_t ticks, bool idle)
{
#ifdef CONFIG_TICKLESS_KERNEL
#if defined(CONFIG_TICKLESS_IDLE) && defined(CONFIG_TICKLESS_KERNEL)
if (idle) {
z_timer_idle_enter(ticks);
} else {
z_set_time(ticks == K_TICKS_FOREVER ? 0 : ticks);
}
#endif
#endif /* TICKLESS_IDLE && TICKLESS_KERNEL */
}
/* The old driver "now" API would return a full uptime value. The new