mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-20 13:25:19 +00:00
fix #4496 - allow unlock of unlocked mutex (making it consistent with windows behaviour)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user