Atomic read-modify-write
= Atomic read-modify-write
An <atomic operation> that reads a shared object's value and changes it as one indivisible action. For an increment from $0$, the two operations under <mutual exclusion> produce $1$ then $2$ in either <software thread> order. A <test-and-set> is another example. The operation's ordering guarantees for other data still depend on the <memory model> and its selected <acquire-release synchronization> semantics.