trivial: move isSchedulable to header

This commit is contained in:
Anna Lyons 2019-05-09 16:02:11 +10:00 committed by Kent Mcleod
parent bf56d30d47
commit b358a1c59c
2 changed files with 10 additions and 13 deletions

View file

@ -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);

View file

@ -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);