aboutsummaryrefslogtreecommitdiff
path: root/mutex.h
diff options
context:
space:
mode:
authorTest_User <hax@andrewyu.org>2024-06-18 15:32:54 -0400
committerTest_User <hax@andrewyu.org>2024-06-18 15:32:54 -0400
commitadced03b24272f31f5d7dc8764c8ca7fc7821c7e (patch)
treefb5fbf51faa2aa62af7885b8587aea7e856e863d /mutex.h
parent9f5d2e74e61cbc112d6e71176f4389f0be2c4f9f (diff)
downloadhaxircd-adced03b24272f31f5d7dc8764c8ca7fc7821c7e.tar.gz
haxircd-adced03b24272f31f5d7dc8764c8ca7fc7821c7e.zip
Some fixes
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);
}