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:
Flavio Ceolin 2019-03-08 14:53:42 -08:00 committed by Anas Nashif
commit 2ecc7cfa55

View file

@ -90,12 +90,12 @@ static inline bool z_is_thread_pending(struct k_thread *thread)
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;
return state & (_THREAD_PENDING | _THREAD_PRESTART | _THREAD_DEAD |
_THREAD_DUMMY | _THREAD_SUSPENDED);
return (state & (_THREAD_PENDING | _THREAD_PRESTART | _THREAD_DEAD |
_THREAD_DUMMY | _THREAD_SUSPENDED)) != 0;
}