Home
last modified time | relevance | path

Searched refs:sem (Results 1 – 10 of 10) sorted by relevance

/frameworks/libs/binary_translation/tests/ndk_program_tests/
Dsem_test.cc24 sem_t sem; in TEST() local
25 ASSERT_EQ(sem_init(&sem, 0, 0), 0); in TEST()
26 ASSERT_EQ(sem_post(&sem), 0); in TEST()
28 ASSERT_EQ(sem_getvalue(&sem, &value), 0); in TEST()
30 ASSERT_EQ(sem_wait(&sem), 0); in TEST()
31 ASSERT_EQ(sem_trywait(&sem), -1); in TEST()
33 ASSERT_EQ(sem_destroy(&sem), 0); in TEST()
42 sem_t sem; in TEST() local
43 ASSERT_EQ(sem_init(&sem, 0, 0), 0); in TEST()
45 ASSERT_EQ(pthread_create(&thread, nullptr, &SeparateThread, reinterpret_cast<void*>(&sem)), 0); in TEST()
[all …]
Dfutex_test.cc78 sem_t sem; member
83 sem_post(&data->sem); in FutexWaitThread()
99 ASSERT_EQ(sem_init(&data.sem, 0, 0), 0); in TEST()
108 ASSERT_EQ(sem_wait(&data.sem), 0); in TEST()
/frameworks/libs/binary_translation/guest_os_primitives/
Dguest_thread_clone.cc51 sem_t sem; member
73 CHECK_EQ(0, sem_post(&info->sem)); in RunClonedGuestThread()
155 sem_init(&info.sem, 0, 0); in CloneGuestThread()
171 CHECK_EQ(0, sem_wait(&info.sem)); // Wait with blocked signals to avoid EINTR. in CloneGuestThread()
179 sem_destroy(&info.sem); in CloneGuestThread()
Dguest_thread_pthread_create.cc43 sem_init(&info.sem, 0, 0); in CreateNewGuestThread()
51 CHECK_EQ(0, sem_wait(&info.sem)); // Wait with blocked signals to avoid EINTR. in CreateNewGuestThread()
59 sem_destroy(&info.sem); in CreateNewGuestThread()
Dguest_thread_pthread_create.h33 sem_t sem; member
Dguest_thread_pthread_create_arch.cc44 CHECK_EQ(0, sem_post(&info->sem)); in RunGuestThread()
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/
DCameraStressTest.java68 final Semaphore sem = new Semaphore(0); in setUp() local
75 sem.release(); in setUp()
81 if (!sem.tryAcquire(WAIT_TIMEOUT, TimeUnit.MILLISECONDS)) { in setUp()
114 final Semaphore sem = new Semaphore(0); in runOnLooper() local
121 sem.release(); in runOnLooper()
125 if (!sem.tryAcquire(WAIT_TIMEOUT, TimeUnit.MILLISECONDS)) { in runOnLooper()
DMediaRecorderStressTest.java73 final Semaphore sem = new Semaphore(0); in setUp() local
80 sem.release(); in setUp()
86 if (! sem.tryAcquire(WAIT_TIMEOUT, TimeUnit.MILLISECONDS)) { in setUp()
120 final Semaphore sem = new Semaphore(0); in runOnLooper() local
127 sem.release(); in runOnLooper()
131 if (! sem.tryAcquire(WAIT_TIMEOUT, TimeUnit.MILLISECONDS)) { in runOnLooper()
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/camera/
DCameraFunctionalTest.java61 final Semaphore sem = new Semaphore(0); in setUp() local
68 sem.release(); in setUp()
74 if (!sem.tryAcquire(WAIT_TIMEOUT, TimeUnit.MILLISECONDS)) { in setUp()
100 final Semaphore sem = new Semaphore(0); in runOnLooper() local
107 sem.release(); in runOnLooper()
111 if (!sem.tryAcquire(WAIT_TIMEOUT, TimeUnit.MILLISECONDS)) { in runOnLooper()
DCameraPairwiseTest.java69 final Semaphore sem = new Semaphore(0); in setUp() local
76 sem.release(); in setUp()
82 if (!sem.tryAcquire(WAIT_TIMEOUT, TimeUnit.MILLISECONDS)) { in setUp()
108 final Semaphore sem = new Semaphore(0); in runOnLooper() local
115 sem.release(); in runOnLooper()
119 if (!sem.tryAcquire(WAIT_TIMEOUT, TimeUnit.MILLISECONDS)) { in runOnLooper()