summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/include/sys/spinlock.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/include/sys/spinlock.h b/sys/include/sys/spinlock.h
index 6b1428f..aee852b 100644
--- a/sys/include/sys/spinlock.h
+++ b/sys/include/sys/spinlock.h
@@ -36,10 +36,10 @@ struct spinlock {
volatile _Atomic bool lock;
};
-static inline bool
+static inline void
spinlock_acquire(struct spinlock *lock)
{
- return __atomic_test_and_set(&lock->lock, __ATOMIC_ACQUIRE);
+ while (__atomic_test_and_set(&lock->lock, __ATOMIC_ACQUIRE));
}
static inline void