Yes.



Mutexes/locks are implemented using atomic swap and compare, but there is slightly more to that than simply something that in theory should only take one instruction on a particular...