Searched refs:mtx (Results 1 – 4 of 4) sorted by relevance
110 mtx: self, in lock()127 mtx: &'a CMutex<T>, field134 let sguard = self.mtx.spin_lock.acquire(); in drop()135 self.mtx.locked.set(false); in drop()136 if let Some(list_field) = self.mtx.wait_list.next() { in drop()152 unsafe { &*self.mtx.data.get() } in deref()159 unsafe { &mut *self.mtx.data.get() } in deref_mut()201 let mtx = mtx.clone(); in main()207 *mtx.lock() += 1; in main()212 *mtx.lock() += 1; in main()[all …]
112 PThreadMutexGuard { mtx: self } in lock()117 mtx: &'a PThreadMutex<T>, field123 unsafe { libc::pthread_mutex_unlock(self.mtx.raw.get()) }; in drop()131 unsafe { &*self.mtx.data.get() } in deref()137 unsafe { &mut *self.mtx.data.get() } in deref_mut()155 let mtx: Pin<Arc<PThreadMutex<usize>>> = Arc::try_pin_init(PThreadMutex::new(0)).unwrap(); in main()160 let mtx = mtx.clone(); in main()166 *mtx.lock() += 1; in main()171 *mtx.lock() += 1; in main()181 println!("{:?}", &*mtx.lock()); in main()[all …]
90 let mtx: Pin<Arc<CMutex<usize>>> = Arc::pin_init(CMutex::new(0)).unwrap(); in main()95 let mtx = mtx.clone(); in main()103 *mtx.lock() += 1; in main()111 *mtx.lock() += 1; in main()121 println!("{:?}, {:?}", &*mtx.lock(), &*COUNT.lock()); in main()122 assert_eq!(*mtx.lock(), workload * thread_count * 2); in main()
111 let mtx: Result<Pin<Arc<CMutex<usize>>>, _> = Arc::pin_init(CMutex::new(42));
Completed in 6 milliseconds