Issue memory barrier before lock release, not after. This ensures
authorvisa <visa@openbsd.org>
Tue, 4 Apr 2017 12:30:04 +0000 (12:30 +0000)
committervisa <visa@openbsd.org>
Tue, 4 Apr 2017 12:30:04 +0000 (12:30 +0000)
commit8bbe91a80ec97163dfbb1128a4f7ebd743c20c4e
tree724ab75cf50fe20637937f19ebfad4bc91c03fc7
parent9860458a249e0b3d61f1554af63d266ef0bed7bb
Issue memory barrier before lock release, not after. This ensures
the release write becomes globally visible only after any writes
of the critical section are globally visible. In practice, the
reordering has not happened because the kernel runs in the total
store order mode.

Tested by and OK kettenis@
sys/arch/sparc64/sparc64/lock_machdep.c