Skip to content

Commit 55a7d18

Browse files
author
Austin Kiekintveld
committed
Add comment
1 parent a05df2e commit 55a7d18

File tree

1 file changed

+2
-0
lines changed
  • library/std/src/sys_common/condvar

1 file changed

+2
-0
lines changed

library/std/src/sys_common/condvar/check.rs

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ impl SameMutexCheck {
2424
}
2525
pub fn verify(&self, mutex: &MovableMutex) {
2626
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.
2729
match self.addr.compare_exchange(
2830
ptr::null_mut(),
2931
addr,

0 commit comments

Comments
 (0)