News for hackers. Stuff that matters.
Re:A Proposal Fix for C/C++ Relaxed Atomics in Practice by dataflow on Sunday November 05, 2023 @06:56PM (#38157088)
Isn't the problem elsewhere here? The fact that people are using an API whose entire purpose they don't understand? "I passed a flag without understanding at all what it's supposed to do" doesn't seem specific to atomics at all.

This feels exactly like crossing an intersection without looking around despite noticing a sign saying "blind intersection", then being surprised when you get hit, then blaming it on the sign being "tricky" to reason about. There was nothing tricky about the logic... you just ignored it.

Re:A Proposal Fix for C/C++ Relaxed Atomics in Practice by _huayra_ on Sunday November 05, 2023 @11:47PM (#38158950)
Just to be clear, I'm agreeing with you. It's people using an API they don't understand but happens to work because of TSO. When you take away TSO (e.g. on ARM), those assumptions come back to haunt the code in very tricky race conditions.