A synchronizes-with relation orders evaluations in different threads when one thread reads the value written by a corresponding atomic operation in another. Synchronization supplies cross-thread ordering beyond the sequenced-before relation within one thread. section 19.1
TAKEAWAY
- Atomic modifications of an object have a modification order consistent with each participating thread’s sequenced-before order. section 19.1
- Two threads synchronize through an atomic when one reads the value written by the other; synchronization can also arise from certain C library calls. section 19.1
Observed writes establish synchronization
For an atomic x, suppose thread A writes 31 during --x and thread B reads that value while also modifying x. B synchronizes with A. Later, A reads the value 5 written by B and stores it in y; that observation establishes synchronization in the opposite direction. section 19.1


