diff options
| author | Austin Kiekintveld <akiekintveld@icloud.com> | 2022-05-01 19:07:36 -0700 |
|---|---|---|
| committer | Austin Kiekintveld <akiekintveld@icloud.com> | 2022-05-01 19:07:36 -0700 |
| commit | 55a7d18189cfa65a35dacf63ee9e70aedd85e3c4 (patch) | |
| tree | 53a9a60d834734039ddfbdc04a784a16e7d533a2 | |
| parent | a05df2ea19c1a2c074fcf98211d3418ba9af479c (diff) | |
| download | rust-55a7d18189cfa65a35dacf63ee9e70aedd85e3c4.tar.gz rust-55a7d18189cfa65a35dacf63ee9e70aedd85e3c4.zip | |
Add comment
| -rw-r--r-- | library/std/src/sys_common/condvar/check.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/sys_common/condvar/check.rs b/library/std/src/sys_common/condvar/check.rs index a3842b3f857..d0d0d596518 100644 --- a/library/std/src/sys_common/condvar/check.rs +++ b/library/std/src/sys_common/condvar/check.rs @@ -24,6 +24,8 @@ impl SameMutexCheck { } pub fn verify(&self, mutex: &MovableMutex) { let addr = mutex.raw() as *const imp::Mutex as *const () as *mut _; + // Relaxed is okay here because we never read through `self.addr`, and only use it to + // compare addresses. match self.addr.compare_exchange( ptr::null_mut(), addr, |
