mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-09 14:22:18 -04:00
Fix mutex_lock
This commit is contained in:
1 parent
ad2122a7fc
commit
21509ae3f4
1 file changed
+1
-1
+1
-1
@@ -369,7 +369,7 @@ gb_internal void semaphore_wait(Semaphore *s) {
|
||||
ANNOTATE_LOCK_PRE(m, 0);
|
||||
i32 expected = Internal_Mutex_State_Unlocked;
|
||||
if (m->state().compare_exchange_strong(expected, Internal_Mutex_State_Locked, std::memory_order_acquire)) {
|
||||
mutex_lock_slow(m, v);
|
||||
mutex_lock_slow(m, expected);
|
||||
}
|
||||
ANNOTATE_LOCK_POST(m);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user