diff --git a/kernel/include/timeout_q.h b/kernel/include/timeout_q.h index 936291398fb..2b406cff73f 100644 --- a/kernel/include/timeout_q.h +++ b/kernel/include/timeout_q.h @@ -18,9 +18,6 @@ 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; @@ -41,6 +38,14 @@ int _abort_thread_timeout(struct k_thread *thread); s32_t _get_next_timeout_expiry(void); +#else + +/* Stubs when !CONFIG_SYS_CLOCK_EXISTS */ +#define _init_thread_timeout(t) do{}while(0) +#define _add_thread_timeout(th,wq,to) do{}while(0) +#define _abort_thread_timeout(t) (0) +#define _get_next_timeout_expiry() (K_FOREVER) + #endif #ifdef __cplusplus diff --git a/kernel/include/wait_q.h b/kernel/include/wait_q.h index fadc255c535..302909ce5c9 100644 --- a/kernel/include/wait_q.h +++ b/kernel/include/wait_q.h @@ -14,36 +14,12 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { #endif -#ifdef CONFIG_SYS_CLOCK_EXISTS -#include -#else -static ALWAYS_INLINE void _init_thread_timeout(struct _thread_base *thread_base) -{ - ARG_UNUSED(thread_base); -} - -static ALWAYS_INLINE void -_add_thread_timeout(struct k_thread *thread, _wait_q_t *wait_q, s32_t timeout) -{ - ARG_UNUSED(thread); - ARG_UNUSED(wait_q); - ARG_UNUSED(timeout); -} - -static ALWAYS_INLINE int _abort_thread_timeout(struct k_thread *thread) -{ - ARG_UNUSED(thread); - - return 0; -} -#define _get_next_timeout_expiry() (K_FOREVER) -#endif - #ifdef CONFIG_WAITQ_SCALABLE #define _WAIT_Q_FOR_EACH(wq, thread_ptr) \