// 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 a = 0; atomic_int x = 0; atomic_int y = 0; {{{ { x.load(mo_acquire); printf("%dn", a); } ||| { a = 1; atomic_thread_fence (mo_release); x.store(1, mo_relaxed); y.store(1, mo_relaxed); } ||| { y.load(mo_acquire); printf("%dn", a); } }}}; return 0; }