Skip to content

Commit

Permalink
Fix incorrect memory ordering in RwLock
Browse files Browse the repository at this point in the history
Fixes #323
  • Loading branch information
Amanieu committed May 30, 2022
1 parent 6f6e021 commit d26c284
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/raw_rwlock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -988,8 +988,8 @@ impl RawRwLock {
if let Err(x) = self.state.compare_exchange_weak(
state,
state | WRITER_PARKED_BIT,
Ordering::Relaxed,
Ordering::Relaxed,
Ordering::Acquire,
Ordering::Acquire,
) {
state = x;
continue;
Expand Down

0 comments on commit d26c284

Please sign in to comment.