We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a05df2e commit 55a7d18Copy full SHA for 55a7d18
library/std/src/sys_common/condvar/check.rs
@@ -24,6 +24,8 @@ impl SameMutexCheck {
24
}
25
pub fn verify(&self, mutex: &MovableMutex) {
26
let addr = mutex.raw() as *const imp::Mutex as *const () as *mut _;
27
+ // Relaxed is okay here because we never read through `self.addr`, and only use it to
28
+ // compare addresses.
29
match self.addr.compare_exchange(
30
ptr::null_mut(),
31
addr,
0 commit comments