x86-64: fix memory ordering issues when setting thread-waiting-for.
commitf8b556a78cac9c5630040b0d1cdcc9cdfdc08e9a
authorStas Boukarev <stassats@gmail.com>
Tue, 12 Mar 2024 21:03:35 +0000 (13 00:03 +0300)
committerStas Boukarev <stassats@gmail.com>
Tue, 12 Mar 2024 21:03:35 +0000 (13 00:03 +0300)
treed72ee3e9e6e409c24e022a5b7371ae0a8b763a7f
parent1aaeffe0bc7319f07413077a9a0c17877f995a4a
x86-64: fix memory ordering issues when setting thread-waiting-for.

x86-64 may reorder stores after and loads. Since :write is a no-op for
x86-64 use a :memory barrier.
An XCHG instruction should be enough but there's no support for it at
the moment.
src/code/target-thread.lisp