Modification order is the total order of modifications to one atomic object. It must agree with the sequenced-before order of every thread that modifies or observes that object, so threads perceive its changes consistently. section 21.1
One atomic object, one modification order
For _Atomic(unsigned) x = 11, operations such as ++x, x = 31, x--, x = 5, and x = 0 form modifications of x. A valid modification order places all of them in one order while preserving each thread's local sequenced-before relationships. Reads can synchronize threads when they observe values written by another thread. section 21.1
Figure 21.1 Two threads that synchronize via an atomic. The circles present the modifications of object x. The bars below the threads represent information about the state of A, and those above represent information about the state of B.
Use the thread diagram to track the six modifications of x and the synchronization points created when threads read one another's atomic writes. section 21.1
Keep these distinctions in view:
- A modification order belongs to one atomic object; it does not automatically impose one order across different atomic objects. section 21.1 section 21.3
- Sequential consistency strengthens the rule by requiring all sequentially consistent operations, even on different atomic objects, to fit one global modification order. section 21.3


