fix #4496 - allow unlock of unlocked mutex (making it consistent with windows behaviour)
This commit is contained in:
1 parent
7edd332993
commit
f1cae8d844
1 file changed
+1
-1
@@ -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