提交 21db4036 编写于 作者: P Palmer Dabbelt

RISC-V: Add READ_ONCE in arch_spin_is_locked()

This was just incorrect in the original version.
Signed-off-by: NPalmer Dabbelt <palmer@sifive.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册