RISC-V: Add READ_ONCE in arch_spin_is_locked()

This was just incorrect in the original version.

Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
This commit is contained in:
Palmer Dabbelt 2017-11-28 14:05:04 -08:00
parent 9347ce54cd
commit 21db403660
1 changed files with 1 additions and 1 deletions

View File

@ -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)
{