# Cpp Reference Authors - C Memory Order (Highlights) ![rw-book-cover|256](https://readwise-assets.s3.amazonaws.com/static/images/article1.be68295a7e40.png) ## Metadata **Review**:: [readwise.io](https://readwise.io/bookreview/56255653) **Source**:: #from/readwise #from/reader **Zettel**:: #zettel/fleeting **Status**:: #x **Authors**:: [[Cpp Reference Authors]] **Full Title**:: C Memory Order **Category**:: #articles #readwise/articles **Category Icon**:: 📰 **URL**:: [en.cppreference.com](https://en.cppreference.com/w/c/atomic/memory_order) **Host**:: [[en.cppreference.com]] **Highlighted**:: [[2025-11-15]] **Created**:: [[2025-11-15]] ## Highlights - The default behavior of all atomic operations in the [language](https://en.cppreference.com/w/c/atomic/language/atomic.html) and the library provides for *sequentially consistent ordering* (see discussion below). ([View Highlight](https://read.readwise.io/read/01ka2e9veszsav76pjz95w2efh)) ^957514235 - All memory writes (non-atomic and relaxed atomic) that *happened-before* the atomic store from the point of view of thread A, become *visible side-effects* within those operations in thread B into which the load operation *carries dependency*, that is, once the atomic load is completed, those operators and functions in thread B that use the value obtained from the load are guaranteed to see what thread A wrote to memory. ([View Highlight](https://read.readwise.io/read/01ka2er9nf36pzbscaev38wy2c)) ^957514719 Thread B sees writes from Thread A only if they are used through the dependency chain of the consumed value. - The synchronization is established only between the threads *releasing* and *consuming* the same atomic variable. ([View Highlight](https://read.readwise.io/read/01ka2ex48s6h99mj1b1bkv31bs)) ^957514847 - All memory writes (including non-atomic and relaxed atomic) that *happened-before* the atomic store from the point of view of thread A, become *visible side-effects* in thread B. That is, once the atomic load is completed, thread B is guaranteed to see everything thread A wrote to memory. This promise only holds if B actually returns the value that A stored, or a value from later in the release sequence. ([View Highlight](https://read.readwise.io/read/01ka2fbnpfk04aprrkerygwv2d)) ^957515260 - Atomic operations tagged memory_order_seq_cst not only order memory the same way as release/acquire ordering (everything that *happened-before* a store in one thread becomes a *visible side effect* in the thread that did a load), but also establish a *single total modification order* of all atomic operations that are so tagged. ([View Highlight](https://read.readwise.io/read/01ka2fybe7hcrhsv5sn5mszp79)) ^957515891