kernel: Make _is_thread_prevented_from_running return a bool
This function was returning an essentially boolean value. Just changing the signature to return a bool. MISRA-C rule 14.4 Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
39a50f6392
commit
2ecc7cfa55
1 changed files with 3 additions and 3 deletions
|
@ -90,12 +90,12 @@ static inline bool z_is_thread_pending(struct k_thread *thread)
|
||||||
return !!(thread->base.thread_state & _THREAD_PENDING);
|
return !!(thread->base.thread_state & _THREAD_PENDING);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int z_is_thread_prevented_from_running(struct k_thread *thread)
|
static inline bool z_is_thread_prevented_from_running(struct k_thread *thread)
|
||||||
{
|
{
|
||||||
u8_t state = thread->base.thread_state;
|
u8_t state = thread->base.thread_state;
|
||||||
|
|
||||||
return state & (_THREAD_PENDING | _THREAD_PRESTART | _THREAD_DEAD |
|
return (state & (_THREAD_PENDING | _THREAD_PRESTART | _THREAD_DEAD |
|
||||||
_THREAD_DUMMY | _THREAD_SUSPENDED);
|
_THREAD_DUMMY | _THREAD_SUSPENDED)) != 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue