For purposes of ordering, is atomic read-modify-write one operation or two?
问题 Consider an atomic read-modify-write operation such as x.exchange(..., std::memory_order_acq_rel) . For purposes of ordering with respect to loads and stores to other objects, is this treated as: a single operation with acquire-release semantics? Or, as an acquire load followed by a release store, with the added guarantee that other loads and stores to x will observe both of them or neither? If it's #2, then although no other operations in the same thread could be reordered before the load or