aboutsummaryrefslogtreecommitdiff
path: root/mutex.h
diff options
context:
space:
mode:
Diffstat (limited to 'mutex.h')
-rw-r--r--mutex.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/mutex.h b/mutex.h
index cab4018..56f8a42 100644
--- a/mutex.h
+++ b/mutex.h
@@ -43,7 +43,7 @@ inline int mutex_init(uint32_t *futex) {
inline void mutex_lock(uint32_t *futex) {
uint32_t val;
- while (val = __sync_lock_test_and_set(futex, 1))
+ while ((val = __sync_lock_test_and_set(futex, 1)))
syscall(SYS_futex, futex, FUTEX_WAIT, val, 0, 0, 0);
}