fix #4496 - allow unlock of unlocked mutex (making it consistent with windows behaviour)

This commit is contained in:
Laytan Laats
2024-12-06 23:08:47 +01:00
parent 7edd332993
commit f1cae8d844

View File

@@ -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: