Refactored atomic operations to be identified by an AtomicOp enum.
AtomicCmpXchg registers atomic access when it performs a write.