From f1cae8d844f1ee5903d490d8bf91a2502189571c Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Fri, 6 Dec 2024 23:08:47 +0100 Subject: [PATCH] fix #4496 - allow unlock of unlocked mutex (making it consistent with windows behaviour) --- core/sync/primitives_atomic.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/sync/primitives_atomic.odin b/core/sync/primitives_atomic.odin index 3c4324eb7..a8a84b2bc 100644 --- a/core/sync/primitives_atomic.odin +++ b/core/sync/primitives_atomic.odin @@ -67,7 +67,7 @@ atomic_mutex_unlock :: proc "contextless" (m: ^Atomic_Mutex) { switch atomic_exchange_explicit(&m.state, .Unlocked, .Release) { case .Unlocked: - unreachable() + // Kind of okay - unlocking while already unlocked. case .Locked: // Okay case .Waiting: