diff --git a/os/rt/include/chthreads.h b/os/rt/include/chthreads.h index 4f4fed004..ef83fc963 100644 --- a/os/rt/include/chthreads.h +++ b/os/rt/include/chthreads.h @@ -327,7 +327,7 @@ static inline bool chThdTerminatedX(thread_t *tp) { */ static inline bool chThdShouldTerminateX(void) { - return (bool)(chThdGetSelfX()->p_flags & CH_FLAG_TERMINATE); + return (bool)((chThdGetSelfX()->p_flags & CH_FLAG_TERMINATE) != 0); } /**