kernel/sys_clock: Fix build when !SYS_CLOCK_EXISTS
This got broken. Add some #ifery to handle the case. Not clean, will clean up in a future pass once the API is final. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
0e4532a3d4
commit
8b54953e4b
3 changed files with 15 additions and 2 deletions
|
@ -65,7 +65,9 @@ static void sys_power_save_idle(s32_t ticks)
|
|||
* saves no power and does not improve latency. But it's an
|
||||
* API we need to honor...
|
||||
*/
|
||||
#ifdef CONFIG_SYS_CLOCK_EXISTS
|
||||
z_clock_set_timeout(ticks < IDLE_THRESH ? 1 : ticks, true);
|
||||
#endif
|
||||
|
||||
set_kernel_idle_time_in_ticks(ticks);
|
||||
#if (defined(CONFIG_SYS_POWER_LOW_POWER_STATE) || \
|
||||
|
|
|
@ -18,6 +18,11 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* If no clock, these get defined in wait_q.h instead. Weird header
|
||||
* convention, should fix.
|
||||
*/
|
||||
#ifdef CONFIG_SYS_CLOCK_EXISTS
|
||||
|
||||
extern u64_t z_last_tick_announced;
|
||||
|
||||
void _init_timeout(struct _timeout *t, _timeout_func_t func);
|
||||
|
@ -36,6 +41,8 @@ int _abort_thread_timeout(struct k_thread *thread);
|
|||
|
||||
s32_t _get_next_timeout_expiry(void);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_CLOCK_EXISTS
|
||||
static void _handle_expired_timeouts(sys_dlist_t *expired);
|
||||
#if defined(CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME)
|
||||
int z_clock_hw_cycles_per_sec = CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC;
|
||||
#endif
|
||||
|
@ -50,8 +51,6 @@ int _sys_clock_always_on = 1;
|
|||
static u32_t next_ts;
|
||||
#endif
|
||||
|
||||
static void _handle_expired_timeouts(sys_dlist_t *expired);
|
||||
|
||||
u32_t z_tick_get_32(void)
|
||||
{
|
||||
#ifdef CONFIG_TICKLESS_KERNEL
|
||||
|
@ -359,6 +358,8 @@ void k_disable_sys_clock_always_on(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SYS_CLOCK_EXISTS
|
||||
|
||||
extern u64_t z_last_tick_announced;
|
||||
|
||||
/* initialize the timeouts part of k_thread when enabled in the kernel */
|
||||
|
@ -413,6 +414,7 @@ static inline void _unpend_thread_timing_out(struct k_thread *thread,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Handle one timeout from the expired timeout queue. Removes it from the wait
|
||||
* queue it is on if waiting for an object; in this case, the return value is
|
||||
|
@ -620,3 +622,5 @@ void _add_thread_timeout(struct k_thread *thread,
|
|||
{
|
||||
_add_timeout(thread, &thread->base.timeout, wait_q, timeout_in_ticks);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_SYS_CLOCK_EXISTS */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue