kernel: add _is_thread_state_set()
Change-Id: I2b6a51c23997afeb5252a3632172156ba96252ce Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
This commit is contained in:
parent
39b80d8f29
commit
0a49ba38b8
1 changed files with 5 additions and 0 deletions
|
@ -271,6 +271,11 @@ static inline void _reset_thread_states(struct k_thread *thread,
|
||||||
thread->base.thread_state &= ~states;
|
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 */
|
/* mark a thread as being suspended */
|
||||||
static inline void _mark_thread_as_suspended(struct k_thread *thread)
|
static inline void _mark_thread_as_suspended(struct k_thread *thread)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue