kernel/sched: add _is_thread_dummy()

Rather than explicitely checking the thread state bit.

Change-Id: Ic78427d9847e627a0e91d0147d3b6164450597f6
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
This commit is contained in:
Benjamin Walsh 2017-02-12 09:37:08 -05:00 committed by Anas Nashif
commit c1405a7d6b

View file

@ -350,6 +350,11 @@ static inline int _is_thread_pending(struct k_thread *thread)
return !!(thread->base.thread_state & _THREAD_PENDING); return !!(thread->base.thread_state & _THREAD_PENDING);
} }
static inline int _is_thread_dummy(struct k_thread *thread)
{
return _is_thread_state_set(thread, _THREAD_DUMMY);
}
static inline void _mark_thread_as_polling(struct k_thread *thread) static inline void _mark_thread_as_polling(struct k_thread *thread)
{ {
_set_thread_states(thread, _THREAD_POLLING); _set_thread_states(thread, _THREAD_POLLING);