News for hackers. Stuff that matters.
Re:There's No Such Thing as “Implicitly Atomic” by loeg on Thursday October 05, 2023 @04:49PM (#37784126)
No, you’re making an unstated bogus assumption somewhere but I’m not sure which one.
Re:There's No Such Thing as “Implicitly Atomic” by bregma on Tuesday October 10, 2023 @12:02PM (#37833902)
It's the assumption that the hardware operation is the same as the C abstract machine operation.

Hint: they're not, and that causes all kinds of subtle problem when programmers assume they are, especially when it comes to atomicity. The compiler caches a value in a register and two threads synchronize on that value? Boom. Or maybe no boom when one was expected.