kernel/include: Move stubs for timeout functions to their declarations
The timeout_q.h scheme, where it declared real functions, but the stubs for when there was no clock were in wait_q.h was senselessly weird. Put them in the same file. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
9098a45c84
commit
2ae8f50936
2 changed files with 9 additions and 28 deletions
|
@ -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
|
||||
|
|
|
@ -14,36 +14,12 @@
|
|||
#include <misc/rb.h>
|
||||
#include <ksched.h>
|
||||
#include <sched_priq.h>
|
||||
#include <timeout_q.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_CLOCK_EXISTS
|
||||
#include <timeout_q.h>
|
||||
#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) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue