Category "stdatomic"

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() {

Using optimistic locks in C++ and memory order

I'm wondering how 'optimistic locks' (as described e.g. here: https://db.in.tum.de/~leis/papers/artsync.pdf) can be used in C++ with regard to non-atomic data a