1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#if 0 #include <stdatomic.h> _Bool atomic_flag_test_and_set_explicit(volatile atomic_flag *object, memory_order order) { (void)order; _Bool r = (*object == 1); *object = 1; return r; } #endif /* STDC(201112) */