Home
last modified time | relevance | path

Searched refs:try_acquire (Results 1 – 25 of 34) sorted by relevance

12

/external/rust/crates/tokio/tests/
Dsync_semaphore.rs13 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/
Dsemaphore_batch.rs32 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/
Dtry_acquire.pass.cpp36 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/
Dsemaphore.rs143 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()
Drwlock.rs430 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/
Dsemaphore.availability.verify.cpp33 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/
Dcounting_semaphore_facade_test.cc59 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()
Dbinary_semaphore_facade_test.cc54 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()
Dbinary_semaphore.cc31 return semaphore->try_acquire(); in pw_sync_BinarySemaphore_TryAcquire()
Dcounting_semaphore.cc36 return semaphore->try_acquire(); in pw_sync_CountingSemaphore_TryAcquire()
/external/llvm-project/libcxx/include/
Dsemaphore32 bool try_acquire() noexcept;
216 bool try_acquire()
226 return try_acquire();
/external/pigweed/pw_sync_embos/public/pw_sync_embos/
Dcounting_semaphore_inline.h38 inline bool CountingSemaphore::try_acquire() noexcept { in try_acquire() function
Dbinary_semaphore_inline.h38 inline bool BinarySemaphore::try_acquire() noexcept { in try_acquire() function
/external/pigweed/pw_sync_embos/
Dbinary_semaphore.cc34 return try_acquire(); in try_acquire_for()
Dcounting_semaphore.cc48 return try_acquire(); in try_acquire_for()
/external/pigweed/pw_sync_freertos/
Dbinary_semaphore.cc41 return try_acquire(); in try_acquire_for()
Dcounting_semaphore.cc61 return try_acquire(); in try_acquire_for()
/external/pigweed/pw_sync_threadx/
Dcounting_semaphore.cc35 return try_acquire(); in try_acquire_for()
Dbinary_semaphore.cc35 return try_acquire(); in try_acquire_for()
/external/pigweed/pw_sync_stl/
Dbinary_semaphore.cc36 bool BinarySemaphore::try_acquire() noexcept { in try_acquire() function in pw::sync::BinarySemaphore
Dcounting_semaphore.cc39 bool CountingSemaphore::try_acquire() noexcept { in try_acquire() function in pw::sync::CountingSemaphore
/external/pigweed/pw_sync_threadx/public/pw_sync_threadx/
Dcounting_semaphore_inline.h54 inline bool CountingSemaphore::try_acquire() noexcept { in try_acquire() function
Dbinary_semaphore_inline.h53 inline bool BinarySemaphore::try_acquire() noexcept { in try_acquire() function
/external/pigweed/pw_sync_freertos/public/pw_sync_freertos/
Dcounting_semaphore_inline.h52 inline bool CountingSemaphore::try_acquire() noexcept { in try_acquire() function
/external/rust/crates/tokio/src/sync/mpsc/
Dbounded.rs451 match self.chan.semaphore().0.try_acquire(1) { in try_send()
679 match self.chan.semaphore().0.try_acquire(1) { in try_reserve()

12