Hi,
I want to use atomic_flags on MCU2_0, but immediately, if I call the "atomic_flag_test_and_set_explicit" function,
the whole processor seems to crash.
#include <stdatomics.h>
atomic_flag flag;
atomic_flag_test_and_set_explicit(&flag, memory_order_acquire);
and if I want to do:
atomic_flag flag = ATOMIC_FLAG_INIT;
the compiler starts to complain
error: non-constant-expression cannot be narrowed from type 'int' to 'atomic_bool' (aka '_Atomic(bool)') in initializer list [-Wc++11-narrowing]
flag = ATOMIC_FLAG_INIT;
Does anyone faced this issue, too?
Thanks
Martin