aboutsummaryrefslogtreecommitdiff
path: root/core/sync
diff options
context:
space:
mode:
authorLaytan Laats <laytanlaats@hotmail.com>2024-12-06 23:08:47 +0100
committerLaytan Laats <laytanlaats@hotmail.com>2024-12-06 23:08:47 +0100
commitf1cae8d844f1ee5903d490d8bf91a2502189571c (patch)
tree60a3d21d230fd3bf4a81b4953fcb3859cf75e435 /core/sync
parent7edd332993b485ebdd81ccce5af5dacb16e72156 (diff)
fix #4496 - allow unlock of unlocked mutex (making it consistent with windows behaviour)
Diffstat (limited to 'core/sync')
-rw-r--r--core/sync/primitives_atomic.odin2
1 files changed, 1 insertions, 1 deletions
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: