Skip to content

Commit f1cf11d

Browse files
[libc] fix unlock detection
1 parent edb8330 commit f1cf11d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libc/src/__support/threads/linux/raw_mutex.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class RawMutex {
107107
if (prev == CONTENTED)
108108
wake(is_pshared);
109109
// Detect invalid unlock operation.
110-
return prev == LOCKED;
110+
return prev != UNLOCKED;
111111
}
112112
};
113113
} // namespace internal

0 commit comments

Comments
 (0)