From b358a1c59cd7507ed38c8da240ea5a5674899de5 Mon Sep 17 00:00:00 2001 From: Anna Lyons Date: Thu, 9 May 2019 16:02:11 +1000 Subject: [PATCH] trivial: move isSchedulable to header --- include/kernel/thread.h | 10 ++++++++++ src/kernel/thread.c | 13 ------------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/include/kernel/thread.h b/include/kernel/thread.h index 25efe0326..6a43c20bf 100644 --- a/include/kernel/thread.h +++ b/include/kernel/thread.h @@ -137,6 +137,16 @@ static inline void rollbackTime(void) NODE_STATE(ksCurTime) -= NODE_STATE(ksConsumed); NODE_STATE(ksConsumed) = 0llu; } + +static inline bool_t PURE isSchedulable(const tcb_t *thread) +{ + return isRunnable(thread) && + thread->tcbSchedContext != NULL && + thread->tcbSchedContext->scRefillMax > 0 && + !thread_state_get_tcbInReleaseQueue(thread->tcbState); +} +#else +#define isSchedulable isRunnable #endif void configureIdleThread(tcb_t *tcb); diff --git a/src/kernel/thread.c b/src/kernel/thread.c index 4ebd87c18..3f6613d09 100644 --- a/src/kernel/thread.c +++ b/src/kernel/thread.c @@ -45,19 +45,6 @@ static inline bool_t PURE isBlocked(const tcb_t *thread) } } -#ifdef CONFIG_KERNEL_MCS -static inline bool_t PURE isSchedulable(const tcb_t *thread) -{ - return isRunnable(thread) && - thread->tcbSchedContext != NULL && - thread->tcbSchedContext->scRefillMax > 0 && - !thread_state_get_tcbInReleaseQueue(thread->tcbState); -} -#else -#define isSchedulable isRunnable -#endif - - BOOT_CODE void configureIdleThread(tcb_t *tcb) { Arch_configureIdleThread(tcb);