Lines Matching refs:Mutex
87 pub type Mutex<T> = lock_api::Mutex<RawMutex, T>; typedef
92 pub const fn const_mutex<T>(val: T) -> Mutex<T> { in const_mutex()
93 Mutex::const_new(<RawMutex as lock_api::RawMutex>::INIT, val) in const_mutex()
114 use crate::{Condvar, Mutex};
123 struct Packet<T>(Arc<(Mutex<T>, Condvar)>);
133 let m = Mutex::new(()); in smoke()
143 let m = Arc::new(Mutex::new(0)); in lots_and_lots()
145 fn inc(m: &Mutex<u32>) { in lots_and_lots()
176 let m = Mutex::new(()); in try_lock()
182 let m = Mutex::new(NonCopy(10)); in test_into_inner()
195 let m = Mutex::new(Foo(num_drops.clone())); in test_into_inner_drop()
206 let mut m = Mutex::new(NonCopy(10)); in test_get_mut()
213 let packet = Packet(Arc::new((Mutex::new(false), Condvar::new()))); in test_mutex_arc_condvar()
238 let arc = Arc::new(Mutex::new(1)); in test_mutex_arc_nested()
239 let arc2 = Arc::new(Mutex::new(arc)); in test_mutex_arc_nested()
252 let arc = Arc::new(Mutex::new(1)); in test_mutex_arc_access_in_unwind()
256 i: Arc<Mutex<i32>>, in test_mutex_arc_access_in_unwind()
273 let mutex: &Mutex<[i32]> = &Mutex::new([1, 2, 3]); in test_mutex_unsized()
287 let mutex = Mutex::new(()); in test_mutexguard_sync()
293 let mutex = Mutex::new(vec![0u8, 10]); in test_mutex_debug()
304 let mutex = Mutex::new(contents.clone()); in test_serde()
307 let deserialized: Mutex<Vec<u8>> = deserialize(&serialized).unwrap(); in test_serde()