Commit 21db4036 authored by Palmer Dabbelt's avatar Palmer Dabbelt

RISC-V: Add READ_ONCE in arch_spin_is_locked()

This was just incorrect in the original version.
Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
parent 9347ce54
......@@ -24,7 +24,7 @@
/* FIXME: Replace this with a ticket lock, like MIPS. */
#define arch_spin_is_locked(x) ((x)->lock != 0)
#define arch_spin_is_locked(x) (READ_ONCE((x)->lock) != 0)
static inline void arch_spin_unlock(arch_spinlock_t *lock)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment