Category "memory-barriers"

Visible order of operations with acquire/release fence in C++

I have a following program which uses std::atomic_thread_fences: int data1 = 0; std::atomic<int> data2 = 0; std::atomic<int> state; int main() {

Can CPU Out-of-Order-Execution cause memory reordering?

I know store buffer and invalidate queues are reasons that cause memory reordering. What I don't know is if Out-of-Order-Execution can cause memory reordering.

Can compilers break control dependencies used for LoadStore memory ordering or similar, in any real use-cases?

I'm reading the mail list about LKMM: Add volatile_if(). The control dependency is somewhat subtle since it is easily forgotten by us developers. So I wonder i