+8
−6
+1
−1
Loading
Both in the runtime and in Lisp releasing a spinlock was a simple assignment. That doesn't work because the new value may not make it to main memory by the time another CPU wants to acquire it making it needlessly slow. Worse, it also allows the CPU to reorder instructions from the critical section after the release. There is a spinlock implementation for MIPS in the runtime, but it's not used as we don't have threads on that platform. I don't know if it's broken too.