We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cb463c commit 307aa58Copy full SHA for 307aa58
library/std/src/sys/unix/locks/futex_rwlock.rs
@@ -77,7 +77,7 @@ impl RwLock {
77
78
#[inline]
79
pub unsafe fn read_unlock(&self) {
80
- let state = self.state.fetch_sub(READ_LOCKED, Release) - 1;
+ let state = self.state.fetch_sub(READ_LOCKED, Release) - READ_LOCKED;
81
82
// It's impossible for a reader to be waiting on a read-locked RwLock,
83
// except if there is also a writer waiting.
0 commit comments