Fix typo in futex rwlock.
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
This commit is contained in:
parent
6cb463cb11
commit
307aa588f4
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue