Fix formatting
This commit is contained in:
parent
df4457e20b
commit
a05df2ea19
1 changed files with 6 additions and 2 deletions
|
@ -24,8 +24,12 @@ impl SameMutexCheck {
|
|||
}
|
||||
pub fn verify(&self, mutex: &MovableMutex) {
|
||||
let addr = mutex.raw() as *const imp::Mutex as *const () as *mut _;
|
||||
match self.addr.compare_exchange(ptr::null_mut(), addr, Ordering::Relaxed, Ordering::Relaxed)
|
||||
{
|
||||
match self.addr.compare_exchange(
|
||||
ptr::null_mut(),
|
||||
addr,
|
||||
Ordering::Relaxed,
|
||||
Ordering::Relaxed,
|
||||
) {
|
||||
Ok(_) => {} // Stored the address
|
||||
Err(n) if n == addr => {} // Lost a race to store the same address
|
||||
_ => panic!("attempted to use a condition variable with two mutexes"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue