diff options
author | Benjamin Walsh <benjamin.walsh@windriver.com> | 2016-10-06 16:27:45 -0400 |
---|---|---|
committer | Benjamin Walsh <benjamin.walsh@windriver.com> | 2016-10-10 21:27:44 +0000 |
commit | a6e85b248ac6ff2452faaf0fdb10fd1db1040463 (patch) | |
tree | 087b0aa096e8b997ae2c62b76df08ff1eeb18bd6 /kernel | |
parent | ce9f782a7faa598a3ed95cc45fad8affcfca66ba (diff) |
unified: fix remaining issues for building without SYS_CLOCK_EXIST
Do not include timeout_q.h when !SYS_CLOCK_EXIST, this allows removing
_unpend_thread_timing_out() in that case.
Have _abort_thread_timeout() return 0 (success) when !SYS_CLOCK_EXIST.
With this change, the minimal footprint nanokernel project compiles for
the unified kernel.
Change-Id: Ifbf9167a82fb3ebcf6941bf3f85c105c23c9060c
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/unified/include/timeout_q.h | 5 | ||||
-rw-r--r-- | kernel/unified/include/wait_q.h | 13 |
2 files changed, 7 insertions, 11 deletions
diff --git a/kernel/unified/include/timeout_q.h b/kernel/unified/include/timeout_q.h index 20a1686c7..31642f043 100644 --- a/kernel/unified/include/timeout_q.h +++ b/kernel/unified/include/timeout_q.h @@ -29,7 +29,6 @@ extern "C" { #endif -#if defined(CONFIG_SYS_CLOCK_EXISTS) /* initialize the nano timeouts part of k_thread when enabled in the kernel */ static inline void _init_timeout(struct _timeout *t, _timeout_func_t func) @@ -91,10 +90,6 @@ static inline void _unpend_thread_timing_out(struct k_thread *thread, } } -#else -#define _unpend_thread_timing_out(thread, timeout_obj) do { } while (0) -#endif /* CONFIG_SYS_CLOCK_EXISTS */ - /* * Handle one expired timeout. * diff --git a/kernel/unified/include/wait_q.h b/kernel/unified/include/wait_q.h index 87fd90dc7..a8a358d02 100644 --- a/kernel/unified/include/wait_q.h +++ b/kernel/unified/include/wait_q.h @@ -30,13 +30,14 @@ extern "C" { #endif +#ifdef CONFIG_SYS_CLOCK_EXISTS #include <timeout_q.h> - -#if !defined(CONFIG_SYS_CLOCK_EXISTS) - #define _init_thread_timeout(thread) do { } while ((0)) - #define _abort_thread_timeout(thread) do { } while ((0)) - #define _get_next_timeout_expiry() (K_FOREVER) - #define _add_thread_timeout(thread, pq, ticks) do { } while (0) +#else +#define _init_thread_timeout(thread) do { } while ((0)) +#define _nano_timeout_tcs_init(thread) _init_thread_timeout(thread) +#define _add_thread_timeout(thread, wait_q, timeout) do { } while (0) +static inline int _abort_thread_timeout(struct k_thread *thread) { return 0; } +#define _get_next_timeout_expiry() (K_FOREVER) #endif #ifdef __cplusplus |