builtin_09_atomic_exchange_n.c (203B)
1 int test_main(void) { 2 int x = 30; 3 int prior = __atomic_exchange_n(&x, 99, __ATOMIC_SEQ_CST); 4 /* prior was 30, x is now 99; result is prior + (x - 99) + 12 = 42 */ 5 return prior + (x - 99) + 12; 6 }
kitkit | |
| git clone https://git.ryansepassi.com/git/kit.git | |
| Log | Files | Refs | README |