Fix incorrect memory ordering in RwLock

Fixes #323
This commit is contained in:
Amanieu d'Antras
2022-05-31 00:48:05 +01:00
parent 7c2ee6bd04
commit b31263c04f
+2 -2
View File
@@ -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;