3 ms·
I wasn't involved back then, but I know the history. I thought you were talking about something more recent. But this is all opinions and terms such as "unholy
by uecker 2y ago
I wasn't involved back then, but I know the history. I thought you were talking about something more recent.
But this is all opinions and terms such as "unholy mess" etc do not impress me. In my opinion "volatile" is just fine as is "register. Neither are layer violations nor a type system problem. That the exact semantics of a volatile access are implementation defined seem natural. How is this better with an intrinsic? What I would call a mess are the atomics intrinsics, which - despite being intrinsics - are entirely unsafe and dangerous and indeed mess (just saw a couple of new bugs in our bug tracker).
- tialaramex 2y agoSure, it's just an opinion. I think the consequences speak very well for themselves.
- uecker 2y agoWhat consequences?
- tialaramex 2y agoBecause MMIO is made to look like it's really just memory (rather than a technical convenience) C programmers use the MMIO the same way they would the heap memory in the abstract machine. Sometimes the compiler will correctly intuit what needs to actually be emitted, sometimes the hardware they're actually talking to will compensate for what actually happens - other times it just "misbehaves" because this is not memory and so it doesn't behave like memory.