// This example uses a non-standard simplified thread composition // syntax. Triple braces enclose a list of threads with triple bar // separating each thread. int main() { int x = 0; atomic_int y; {{{ { x = 1; y.store(1,mo_release); } ||| { atomic_compare_exchange_weak_explicit(&y, 1, 2, mo_relaxed, mo_relaxed); printf("%d\n", *(&x - 2 + y.load(mo_consume))); } }}} return 0; }