소스 검색

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

Laytan Laats 9 달 전
부모
커밋
f1cae8d844
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      core/sync/primitives_atomic.odin

+ 1 - 1
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: