Volatile + relaxed atomic load/store

Yes, I understand and in general I agree. My point is that even if I structure my code like you suggested in the other thread thus avoiding ever creating a reference (which I'll try to do at some point!), the question of this thread still applies: how to get atomic semantics on top of volatile semantics?

OK, makes sense. I'll try that, thanks!

Sorry for pressing, let me ask this again to make sure I understood you correctly: