Home
last modified time | relevance | path

Searched refs:try_lock (Results 1 – 25 of 140) sorted by relevance

123456

/external/llvm-project/libcxx/test/std/thread/thread.mutex/thread.lock.algorithm/
Dtry_lock.pass.cpp28 bool try_lock() in try_lock() function in L0
46 bool try_lock() in try_lock() function in L1
64 bool try_lock() in try_lock() function in L2
80 assert(std::try_lock(l0, l1) == -1); in main()
87 assert(std::try_lock(l0, l1) == 1); in main()
94 assert(std::try_lock(l0, l1) == 0); in main()
104 (void)std::try_lock(l0, l1); in main()
118 (void)std::try_lock(l0, l1); in main()
133 assert(std::try_lock(l0, l1, l2) == -1); in main()
142 assert(std::try_lock(l0, l1, l2) == 0); in main()
[all …]
/external/libcxx/test/std/thread/thread.mutex/thread.lock.algorithm/
Dtry_lock.pass.cpp29 bool try_lock() in try_lock() function in L0
47 bool try_lock() in try_lock() function in L1
65 bool try_lock() in try_lock() function in L2
81 assert(std::try_lock(l0, l1) == -1); in main()
88 assert(std::try_lock(l0, l1) == 1); in main()
95 assert(std::try_lock(l0, l1) == 0); in main()
105 (void)std::try_lock(l0, l1); in main()
119 (void)std::try_lock(l0, l1); in main()
134 assert(std::try_lock(l0, l1, l2) == -1); in main()
143 assert(std::try_lock(l0, l1, l2) == 0); in main()
[all …]
/external/rust/crates/tokio/src/runtime/tests/
Dtask.rs47 let _rt = CURRENT.try_lock().unwrap().take(); in with()
61 *CURRENT.try_lock().unwrap() = Some(rt.clone()); in with()
100 self.0.core.try_lock().unwrap().queue.is_empty() in is_empty()
104 self.0.core.try_lock().unwrap().queue.pop_front().unwrap() in next_task()
108 let mut core = self.0.core.try_lock().unwrap(); in shutdown()
120 while !self.0.core.try_lock().unwrap().tasks.is_empty() { in shutdown()
136 self.core.try_lock().unwrap().tasks.remove(ptr); in maintenance()
144 let rt = CURRENT.try_lock().unwrap().as_ref().unwrap().clone(); in bind()
145 rt.0.core.try_lock().unwrap().tasks.push_front(task); in bind()
157 self.0.core.try_lock().unwrap().queue.push_back(task); in schedule()
/external/rust/crates/futures-channel/src/
Doneshot.rs136 if let Some(mut slot) = self.data.try_lock() { in send()
148 if let Some(mut slot) = self.data.try_lock() { in send()
184 match self.tx_task.try_lock() { in poll_canceled()
222 if let Some(mut slot) = self.rx_task.try_lock() { in drop_tx()
231 if let Some(mut slot) = self.tx_task.try_lock() { in drop_tx()
240 if let Some(mut handle) = self.tx_task.try_lock() { in close_rx()
252 if let Some(mut slot) = self.data.try_lock() { in try_recv()
275 match self.rx_task.try_lock() { in recv()
293 if let Some(mut slot) = self.data.try_lock() { in recv()
313 if let Some(mut slot) = self.rx_task.try_lock() { in drop_rx()
[all …]
Dlock.rs55 pub(crate) fn try_lock(&self) -> Option<TryLock<'_, T>> { in try_lock() method
97 let mut a1 = a.try_lock().unwrap(); in smoke()
98 assert!(a.try_lock().is_none()); in smoke()
102 assert_eq!(*a.try_lock().unwrap(), 2); in smoke()
103 assert_eq!(*a.try_lock().unwrap(), 2); in smoke()
/external/llvm-project/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/
Dtry_lock.pass.cpp28 bool try_lock() in try_lock() function
41 assert(lk.try_lock() == true); in main()
47 TEST_IGNORE_NODISCARD lk.try_lock(); in main()
56 assert(lk.try_lock() == false); in main()
63 TEST_IGNORE_NODISCARD lk.try_lock(); in main()
/external/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/
Dtry_lock.pass.cpp27 bool try_lock() in try_lock() function
40 assert(lk.try_lock() == true); in main()
46 TEST_IGNORE_NODISCARD lk.try_lock(); in main()
55 assert(lk.try_lock() == false); in main()
62 TEST_IGNORE_NODISCARD lk.try_lock(); in main()
/external/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/
Dtry_lock.pass.cpp34 assert(!m.try_lock()); in f()
35 assert(!m.try_lock()); in f()
36 assert(!m.try_lock()); in f()
37 while(!m.try_lock()) in f()
40 assert(m.try_lock()); in f()
/external/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/
Dtry_lock.pass.cpp34 assert(!m.try_lock()); in f()
35 assert(!m.try_lock()); in f()
36 assert(!m.try_lock()); in f()
37 while(!m.try_lock()) in f()
40 assert(m.try_lock()); in f()
/external/llvm-project/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/
Dtry_lock.pass.cpp37 assert(!m.try_lock()); in f()
38 assert(!m.try_lock()); in f()
39 assert(!m.try_lock()); in f()
40 while(!m.try_lock()) in f()
43 assert(m.try_lock()); in f()
/external/llvm-project/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/
Dtry_lock.pass.cpp38 assert(!m.try_lock()); in f()
39 assert(!m.try_lock()); in f()
40 assert(!m.try_lock()); in f()
41 while(!m.try_lock()) in f()
44 assert(m.try_lock()); in f()
/external/llvm-project/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/
Dtry_lock.pass.cpp42 assert(lk.try_lock() == true); in main()
48 TEST_IGNORE_NODISCARD lk.try_lock(); in main()
57 assert(lk.try_lock() == false); in main()
64 TEST_IGNORE_NODISCARD lk.try_lock(); in main()
/external/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/
Dtry_lock.pass.cpp41 assert(lk.try_lock() == true); in main()
47 TEST_IGNORE_NODISCARD lk.try_lock(); in main()
56 assert(lk.try_lock() == false); in main()
63 TEST_IGNORE_NODISCARD lk.try_lock(); in main()
/external/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/
Dtry_lock.pass.cpp35 assert(!m.try_lock()); in f()
36 assert(!m.try_lock()); in f()
37 assert(!m.try_lock()); in f()
38 while(!m.try_lock()) in f()
/external/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/
Dtry_lock.pass.cpp35 assert(!m.try_lock()); in f()
36 assert(!m.try_lock()); in f()
37 assert(!m.try_lock()); in f()
38 while(!m.try_lock()) in f()
/external/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/
Dtry_lock.pass.cpp34 assert(!m.try_lock()); in f()
35 assert(!m.try_lock()); in f()
36 assert(!m.try_lock()); in f()
37 while(!m.try_lock()) in f()
/external/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/
Dtry_lock.pass.cpp34 assert(!m.try_lock()); in f()
35 assert(!m.try_lock()); in f()
36 assert(!m.try_lock()); in f()
37 while(!m.try_lock()) in f()
/external/llvm-project/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/
Dtry_lock.pass.cpp37 assert(!m.try_lock()); in f()
38 assert(!m.try_lock()); in f()
39 assert(!m.try_lock()); in f()
40 while(!m.try_lock()) in f()
/external/llvm-project/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/
Dtry_lock.pass.cpp44 assert(!m.try_lock()); in f()
45 assert(!m.try_lock()); in f()
46 assert(!m.try_lock()); in f()
47 while(!m.try_lock()) in f()
/external/llvm-project/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/
Dtry_lock.pass.cpp44 assert(!m.try_lock()); in f()
45 assert(!m.try_lock()); in f()
46 assert(!m.try_lock()); in f()
47 while(!m.try_lock()) in f()
/external/llvm-project/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/
Dtry_lock.pass.cpp38 assert(!m.try_lock()); in f()
39 assert(!m.try_lock()); in f()
40 assert(!m.try_lock()); in f()
41 while(!m.try_lock()) in f()
/external/rust/crates/spin/src/mutex/
Dspin.rs183 pub fn try_lock(&self) -> Option<SpinMutexGuard<T>> { in try_lock() method
219 match self.try_lock() { in fmt()
304 fn try_lock(&self) -> bool { in try_lock() method
306 Self::try_lock(self).map(core::mem::forget).is_some() in try_lock()
377 fn try_lock() { in try_lock() function
381 let a = mutex.try_lock(); in try_lock()
385 let b = mutex.try_lock(); in try_lock()
390 let c = mutex.try_lock(); in try_lock()
475 assert!(lock.try_lock().is_some()); in test_mutex_force_lock()
/external/llvm-project/libcxx/include/
Dmutex29 bool try_lock();
46 bool try_lock() noexcept;
63 bool try_lock();
81 bool try_lock() noexcept;
149 bool try_lock();
170 int try_lock(L1&, L2&, L3&...);
226 bool try_lock() _NOEXCEPT;
250 bool try_lock() _NOEXCEPT;
294 bool try_lock() _NOEXCEPT;
333 try_lock(_L0& __l0, _L1& __l1)
[all …]
/external/libcxx/include/
Dmutex30 bool try_lock();
47 bool try_lock() noexcept;
64 bool try_lock();
82 bool try_lock() noexcept;
150 bool try_lock();
171 int try_lock(L1&, L2&, L3&...);
226 bool try_lock() _NOEXCEPT;
250 bool try_lock() _NOEXCEPT;
294 bool try_lock() _NOEXCEPT;
333 try_lock(_L0& __l0, _L1& __l1)
[all …]
/external/pigweed/pw_sync/
Dinterrupt_spin_lock_facade_test.cc46 EXPECT_FALSE(static_interrupt_spin_lock.try_lock()); in TEST()
52 const bool locked = interrupt_spin_lock.try_lock(); in TEST()
56 EXPECT_FALSE(interrupt_spin_lock.try_lock()); in TEST()

123456