Re:Mutexes are faster than Spinlocks
by rcxdude on Sunday January 05, 2020 @07:27AM
(#21960990)
It allows the compiler to reorder it with any non-volatile read or write. Of course it still doesn't indicate anything to the CPU. In single-core embedded systems where the CPU doesn't reorder anything and you know the compiler is going to emit a single instruction for a read or write it can be sufficient (for example, this is how FreeRTOS implements all of its threading primitives)
[ Parent
| on HN ]
There are no comments on this comment yet.