From adced03b24272f31f5d7dc8764c8ca7fc7821c7e Mon Sep 17 00:00:00 2001 From: Test_User Date: Tue, 18 Jun 2024 15:32:54 -0400 Subject: Some fixes --- mutex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mutex.h') 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); } -- cgit v1.2.3