Fix typo in futex rwlock.

Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
This commit is contained in:
Mara Bos 2022-04-08 16:07:07 +02:00 committed by GitHub
parent 6cb463cb11
commit 307aa588f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.