Atomics and memory barriers