At some point you have to consider how that hardware implements atomic variables and cmpxchg, because it is certainly not free.
At some point you have to consider how that hardware implements atomic variables and cmpxchg, because it is certainly not free.