kernel/drivers: fix compile warnings
Uncovered by clang we have some functions being only used conditionally, so gaurd them to make them only available when those conditions are met. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
964979f539
commit
80e6a978a6
3 changed files with 6 additions and 2 deletions
|
@ -233,6 +233,7 @@ static inline void divide_configuration_register_set(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_TICKLESS_KERNEL) || defined(CONFIG_TICKLESS_IDLE)
|
||||
/**
|
||||
*
|
||||
* @brief Get the value from the current count register
|
||||
|
@ -251,6 +252,7 @@ static inline u32_t current_count_register_get(void)
|
|||
return read_x2apic(LOAPIC_TIMER_CCR >> 4);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_TICKLESS_IDLE)
|
||||
/**
|
||||
|
|
|
@ -112,12 +112,12 @@ static void prepare_thread_to_run(struct k_thread *thread, void *data)
|
|||
}
|
||||
#endif /* CONFIG_POLL */
|
||||
|
||||
#ifdef CONFIG_POLL
|
||||
static inline void handle_poll_events(struct k_queue *queue, u32_t state)
|
||||
{
|
||||
#ifdef CONFIG_POLL
|
||||
_handle_obj_poll_events(&queue->poll_events, state);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void _impl_k_queue_cancel_wait(struct k_queue *queue)
|
||||
{
|
||||
|
|
|
@ -62,10 +62,12 @@ static inline int is_metairq(struct k_thread *thread)
|
|||
#endif
|
||||
}
|
||||
|
||||
#if CONFIG_ASSERT
|
||||
static inline int _is_thread_dummy(struct k_thread *thread)
|
||||
{
|
||||
return !!(thread->base.thread_state & _THREAD_DUMMY);
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline int _is_idle(struct k_thread *thread)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue