Add comment
This commit is contained in:
parent
a05df2ea19
commit
55a7d18189
1 changed files with 2 additions and 0 deletions
|
@ -24,6 +24,8 @@ impl SameMutexCheck {
|
||||||
}
|
}
|
||||||
pub fn verify(&self, mutex: &MovableMutex) {
|
pub fn verify(&self, mutex: &MovableMutex) {
|
||||||
let addr = mutex.raw() as *const imp::Mutex as *const () as *mut _;
|
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(
|
match self.addr.compare_exchange(
|
||||||
ptr::null_mut(),
|
ptr::null_mut(),
|
||||||
addr,
|
addr,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue