1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#if 0 #include <stdatomic.h> __BASE atomic_exchange_explicit(volatile __TYPE *object, __BASE desired, memory_order order) { switch (order) { default: break; } return *object = desired; } #endif /* STDC(201112) */