kernel: add _is_thread_state_set()

Change-Id: I2b6a51c23997afeb5252a3632172156ba96252ce
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
This commit is contained in:
Benjamin Walsh 2017-01-28 11:54:05 -05:00 committed by Anas Nashif
commit 0a49ba38b8

View file

@ -271,6 +271,11 @@ static inline void _reset_thread_states(struct k_thread *thread,
thread->base.thread_state &= ~states;
}
static inline int _is_thread_state_set(struct k_thread *thread, uint32_t state)
{
return !!(thread->base.thread_state & state);
}
/* mark a thread as being suspended */
static inline void _mark_thread_as_suspended(struct k_thread *thread)
{