Fix typo in futex rwlock.
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
This commit is contained in:
parent
6cb463cb11
commit
307aa588f4
@ -77,7 +77,7 @@ impl RwLock {
|
||||
|
||||
#[inline]
|
||||
pub unsafe fn read_unlock(&self) {
|
||||
let state = self.state.fetch_sub(READ_LOCKED, Release) - 1;
|
||||
let state = self.state.fetch_sub(READ_LOCKED, Release) - READ_LOCKED;
|
||||
|
||||
// It's impossible for a reader to be waiting on a read-locked RwLock,
|
||||
// except if there is also a writer waiting.
|
||||
|
Loading…
x
Reference in New Issue
Block a user