mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +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) {
|
switch atomic_exchange_explicit(&m.state, .Unlocked, .Release) {
|
||||||
case .Unlocked:
|
case .Unlocked:
|
||||||
unreachable()
|
// Kind of okay - unlocking while already unlocked.
|
||||||
case .Locked:
|
case .Locked:
|
||||||
// Okay
|
// Okay
|
||||||
case .Waiting:
|
case .Waiting:
|
||||||
|
|||||||
Reference in New Issue
Block a user