3 ms·
Does C really have a memory model for multithreaded applications? I tried googling but could only find references to C++11. Also, failing to adhere to a memory
by 0x0 6y ago
Does C really have a memory model for multithreaded applications? I tried googling but could only find references to C++11.
Also, failing to adhere to a memory model is one of those tricky things where things seem to work alright on architectures with a strong SMP coherency. But then it all breaks down and you end up chasing heisenbugs all over the place when those assumptions no longer hold. It's not easy to prove a lack of race condition bugs. You usually don't get a compiler error if you forget to mark things volatile, forget memory barriers or forget proper locking.