diff options
-rw-r--r-- | core/riscv-rv32i/task.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/riscv-rv32i/task.c b/core/riscv-rv32i/task.c index eef46efce7..ae1609e9a2 100644 --- a/core/riscv-rv32i/task.c +++ b/core/riscv-rv32i/task.c @@ -574,7 +574,7 @@ void __ram_code mutex_lock(struct mutex *mtx) "li %0, 2\n\t" /* attempt to acquire lock */ "amoswap.w.aq %0, %0, %1\n\t" - : "=r" (locked), "+A" (mtx->lock)); + : "=&r" (locked), "+A" (mtx->lock)); /* we got it ! */ if (!locked) break; |