1.0.24.26: fix release spinlock
authorGabor Melis <mega@hotpop.com>
Fri, 9 Jan 2009 16:43:56 +0000 (16:43 +0000)
committerGabor Melis <mega@hotpop.com>
Fri, 9 Jan 2009 16:43:56 +0000 (16:43 +0000)
commit59f4a9f62d1ab9656b02eef240d7aac65669262d
tree2fed2bad450a79a0003ca9d5173458df9cbe09a2
parent4d633465231c79adeb3e4e59bf30c011d1d0e9dd
1.0.24.26: fix release spinlock

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.
src/code/target-thread.lisp
src/runtime/x86-64-arch.h
src/runtime/x86-arch.h
version.lisp-expr