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:
parent
9347ce54cd
commit
21db403660
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue