/external/rust/crates/tokio/tests/ |
D | sync_semaphore.rs | 13 fn try_acquire() { in try_acquire() function 16 let p1 = sem.try_acquire(); in try_acquire() 18 let p2 = sem.try_acquire(); in try_acquire() 21 let p3 = sem.try_acquire(); in try_acquire() 28 let p1 = sem.try_acquire().unwrap(); in acquire() 52 let p = sem.try_acquire().unwrap(); in forget() 58 assert!(sem.try_acquire().is_err()); in forget() 75 let _p1 = sem.try_acquire().unwrap(); in stresstest() 76 let _p2 = sem.try_acquire().unwrap(); in stresstest() 77 let _p3 = sem.try_acquire().unwrap(); in stresstest() [all …]
|
/external/rust/crates/tokio/src/sync/tests/ |
D | semaphore_batch.rs | 32 assert_ok!(s.try_acquire(1)); in try_acquire_one_available() 35 assert_ok!(s.try_acquire(1)); in try_acquire_one_available() 44 assert_ok!(s.try_acquire(5)); in try_acquire_many_available() 47 assert_ok!(s.try_acquire(5)); in try_acquire_many_available() 117 assert_ok!(s.try_acquire(1)); in try_acquire_one_unavailable() 120 assert_err!(s.try_acquire(1)); in try_acquire_one_unavailable() 125 assert_ok!(s.try_acquire(1)); in try_acquire_one_unavailable() 136 assert_ok!(s.try_acquire(1)); in try_acquire_many_unavailable() 139 assert_err!(s.try_acquire(5)); in try_acquire_many_unavailable() 144 assert_ok!(s.try_acquire(5)); in try_acquire_many_unavailable() [all …]
|
/external/llvm-project/libcxx/test/std/thread/thread.semaphore/ |
D | try_acquire.pass.cpp | 36 assert(s.try_acquire()); in main() 38 assert(s.try_acquire()); in main() 41 assert(s.try_acquire()); in main() 44 assert(s.try_acquire()); in main()
|
/external/rust/crates/tokio/src/sync/ |
D | semaphore.rs | 143 pub fn try_acquire(&self) -> Result<SemaphorePermit<'_>, TryAcquireError> { in try_acquire() method 144 match self.ll_sem.try_acquire(1) { in try_acquire() 163 match self.ll_sem.try_acquire(n) { in try_acquire_many() 224 match self.ll_sem.try_acquire(1) { in try_acquire_owned() 249 match self.ll_sem.try_acquire(n) { in try_acquire_many_owned()
|
D | rwlock.rs | 430 match self.s.try_acquire(1) { in try_read() 482 match self.s.try_acquire(1) { in try_read_owned() 598 match self.s.try_acquire(self.mr) { in try_write() 643 match self.s.try_acquire(self.mr) { in try_write_owned()
|
/external/llvm-project/libcxx/test/libcxx/thread/ |
D | semaphore.availability.verify.cpp | 33 sem.try_acquire(); // expected-error {{is unavailable}} in main() 43 sem.try_acquire(); // expected-error {{is unavailable}} in main() 53 sem.try_acquire(); // expected-error {{is unavailable}} in main()
|
/external/pigweed/pw_sync/ |
D | counting_semaphore_facade_test.cc | 59 EXPECT_FALSE(semaphore.try_acquire()); in TEST() 71 EXPECT_FALSE(semaphore.try_acquire()); in TEST() 76 EXPECT_FALSE(empty_initial_semaphore.try_acquire()); in TEST() 86 EXPECT_FALSE(release_semaphore.try_acquire()); in TEST() 97 EXPECT_FALSE(semaphore.try_acquire()); in TEST()
|
D | binary_semaphore_facade_test.cc | 54 EXPECT_FALSE(semaphore.try_acquire()); in TEST() 65 EXPECT_FALSE(semaphore.try_acquire()); in TEST() 70 EXPECT_FALSE(empty_initial_semaphore.try_acquire()); in TEST() 79 EXPECT_FALSE(release_semaphore.try_acquire()); in TEST()
|
D | binary_semaphore.cc | 31 return semaphore->try_acquire(); in pw_sync_BinarySemaphore_TryAcquire()
|
D | counting_semaphore.cc | 36 return semaphore->try_acquire(); in pw_sync_CountingSemaphore_TryAcquire()
|
/external/llvm-project/libcxx/include/ |
D | semaphore | 32 bool try_acquire() noexcept; 216 bool try_acquire() 226 return try_acquire();
|
/external/pigweed/pw_sync_embos/public/pw_sync_embos/ |
D | counting_semaphore_inline.h | 38 inline bool CountingSemaphore::try_acquire() noexcept { in try_acquire() function
|
D | binary_semaphore_inline.h | 38 inline bool BinarySemaphore::try_acquire() noexcept { in try_acquire() function
|
/external/pigweed/pw_sync_embos/ |
D | binary_semaphore.cc | 34 return try_acquire(); in try_acquire_for()
|
D | counting_semaphore.cc | 48 return try_acquire(); in try_acquire_for()
|
/external/pigweed/pw_sync_freertos/ |
D | binary_semaphore.cc | 41 return try_acquire(); in try_acquire_for()
|
D | counting_semaphore.cc | 61 return try_acquire(); in try_acquire_for()
|
/external/pigweed/pw_sync_threadx/ |
D | counting_semaphore.cc | 35 return try_acquire(); in try_acquire_for()
|
D | binary_semaphore.cc | 35 return try_acquire(); in try_acquire_for()
|
/external/pigweed/pw_sync_stl/ |
D | binary_semaphore.cc | 36 bool BinarySemaphore::try_acquire() noexcept { in try_acquire() function in pw::sync::BinarySemaphore
|
D | counting_semaphore.cc | 39 bool CountingSemaphore::try_acquire() noexcept { in try_acquire() function in pw::sync::CountingSemaphore
|
/external/pigweed/pw_sync_threadx/public/pw_sync_threadx/ |
D | counting_semaphore_inline.h | 54 inline bool CountingSemaphore::try_acquire() noexcept { in try_acquire() function
|
D | binary_semaphore_inline.h | 53 inline bool BinarySemaphore::try_acquire() noexcept { in try_acquire() function
|
/external/pigweed/pw_sync_freertos/public/pw_sync_freertos/ |
D | counting_semaphore_inline.h | 52 inline bool CountingSemaphore::try_acquire() noexcept { in try_acquire() function
|
/external/rust/crates/tokio/src/sync/mpsc/ |
D | bounded.rs | 451 match self.chan.semaphore().0.try_acquire(1) { in try_send() 679 match self.chan.semaphore().0.try_acquire(1) { in try_reserve()
|