/bionic/benchmarks/ |
semaphore_benchmark.cpp | 19 #include <semaphore.h> 23 sem_t semaphore; local 24 sem_init(&semaphore, 1, 1); 29 sem_getvalue(&semaphore, &dummy); 38 sem_t semaphore; local 39 sem_init(&semaphore, 1, 1); 43 sem_wait(&semaphore); 44 sem_post(&semaphore);
|
/external/bluetooth/bluedroid/test/suite/support/ |
callbacks.h | 23 #include <semaphore.h> 27 sem_t *semaphore = callbacks_get_semaphore(#callback); \ 28 sem_wait(semaphore); \ 33 sem_t *semaphore = callbacks_get_semaphore(#callback); \ 34 while (!sem_trywait(semaphore)); \ 36 sem_wait(semaphore); \ 42 sem_t *semaphore = callbacks_get_semaphore(__func__); \ 43 sem_post(semaphore); \
|
callbacks.c | 44 sem_t semaphore; member in struct:__anon6355 90 sem_init(&callback_data[i].semaphore, 0, 0); 96 sem_destroy(&callback_data[i].semaphore); 111 return &callback_data[i].semaphore;
|
/external/bluetooth/bluedroid/osi/include/ |
semaphore.h | 26 // Creates a new semaphore with an initial value of |value|. 31 // Frees a semaphore allocated with |semaphore_new|. |semaphore| may 33 void semaphore_free(semaphore_t *semaphore); 35 // Decrements the value of |semaphore|. If it is 0, this call blocks until 36 // it becomes non-zero. |semaphore| may not be NULL. 37 void semaphore_wait(semaphore_t *semaphore); 39 // Tries to decrement the value of |semaphore|. Returns true if the value was 40 // decremented, false if the value was 0. This function never blocks. |semaphore| 42 bool semaphore_try_wait(semaphore_t *semaphore); [all...] |
/external/bluetooth/bluedroid/osi/src/ |
semaphore.c | 28 #include "semaphore.h" 43 ALOGE("%s unable to allocate semaphore: %s", __func__, strerror(errno)); 51 void semaphore_free(semaphore_t *semaphore) { 52 if (semaphore->fd != -1) 53 close(semaphore->fd); 54 free(semaphore); 57 void semaphore_wait(semaphore_t *semaphore) { 58 assert(semaphore != NULL); 59 assert(semaphore->fd != -1); 62 if (eventfd_read(semaphore->fd, &value) == -1 [all...] |
/external/deqp/framework/delibs/dethread/ |
deSemaphore.h | 23 * \brief Semaphore class. 30 /* Semaphore type. */ 34 * \brief Semaphore attributes. 42 void deSemaphore_destroy (deSemaphore semaphore); 44 void deSemaphore_increment (deSemaphore semaphore); 45 void deSemaphore_decrement (deSemaphore semaphore); 47 deBool deSemaphore_tryDecrement (deSemaphore semaphore);
|
/external/deqp/framework/delibs/dethread/unix/ |
deNamedSemaphoreUnix.c | 21 * \brief Unix implementation of semaphore using named semaphores. 31 #include <semaphore.h> 36 sem_t* semaphore; member in struct:NamedSemaphore_s 59 sem->semaphore = sem_open(name, O_CREAT|O_EXCL, mode, initialValue); 61 if (sem->semaphore == SEM_FAILED) 70 void deSemaphore_destroy (deSemaphore semaphore) 72 NamedSemaphore* sem = (NamedSemaphore*)semaphore; 78 res = sem_close(sem->semaphore); 86 void deSemaphore_increment (deSemaphore semaphore) 88 sem_t* sem = ((NamedSemaphore*)semaphore)->semaphore [all...] |
deSemaphoreUnix.c | 21 * \brief Unix implementation of semaphore. 30 #include <semaphore.h> 52 void deSemaphore_destroy (deSemaphore semaphore) 54 sem_t* sem = (sem_t*)semaphore; 60 void deSemaphore_increment (deSemaphore semaphore) 62 sem_t* sem = (sem_t*)semaphore; 68 void deSemaphore_decrement (deSemaphore semaphore) 70 sem_t* sem = (sem_t*)semaphore; 76 deBool deSemaphore_tryDecrement (deSemaphore semaphore) 78 sem_t* sem = (sem_t*)semaphore; [all...] |
/external/chromium_org/v8/src/base/platform/ |
semaphore-unittest.cc | 8 #include "src/base/platform/semaphore.h" 25 ProducerThread(char* buffer, Semaphore* free_space, Semaphore* used_space) 42 Semaphore* const free_space_; 43 Semaphore* const used_space_; 49 ConsumerThread(const char* buffer, Semaphore* free_space, 50 Semaphore* used_space) 67 Semaphore* const free_space_; 68 Semaphore* const used_space_; 74 explicit WaitAndSignalThread(Semaphore* semaphore [all...] |
semaphore.h | 14 #include <mach/semaphore.h> // NOLINT 16 #include <semaphore.h> // NOLINT 26 // Semaphore 28 // A semaphore object is a synchronization object that maintains a count. The 29 // count is decremented each time a thread completes a wait for the semaphore 30 // object and incremented each time a thread signals the semaphore. When the 31 // count reaches zero, threads waiting for the semaphore blocks until the 34 class Semaphore FINAL { 36 explicit Semaphore(int count); 37 ~Semaphore(); [all...] |
/external/deqp/framework/delibs/dethread/win32/ |
deSemaphoreWin32.c | 21 * \brief Win32 implementation of semaphore. 51 void deSemaphore_destroy (deSemaphore semaphore) 53 HANDLE handle = (HANDLE)semaphore; 57 void deSemaphore_increment (deSemaphore semaphore) 59 HANDLE handle = (HANDLE)semaphore; 64 void deSemaphore_decrement (deSemaphore semaphore) 66 HANDLE handle = (HANDLE)semaphore; 71 deBool deSemaphore_tryDecrement (deSemaphore semaphore) 73 HANDLE handle = (HANDLE)semaphore;
|
/cts/suite/audio_quality/lib/include/ |
Semaphore.h | 21 #include <semaphore.h> 26 * Simple semaphore interface for synchronization between client and server 28 class Semaphore { 30 Semaphore(int count = 0); 32 ~Semaphore(); 34 /// down semaphore if it is already positive.
|
/development/ndk/platforms/android-3/arch-arm/include/asm/ |
semaphore.h | 23 struct semaphore { struct 31 #define __DECLARE_SEMAPHORE_GENERIC(name,count) struct semaphore name = __SEMAPHORE_INIT(name,count)
|
/development/ndk/platforms/android-3/include/linux/ |
cpu.h | 19 #include <asm/semaphore.h>
|
/external/chromium_org/chrome/android/java/src/org/chromium/chrome/browser/sync/ |
ChromiumSyncAdapter.java | 24 import java.util.concurrent.Semaphore; 64 Semaphore semaphore = new Semaphore(0); local 68 getStartupCallback(mApplication, account, extras, syncResult, semaphore); 69 startBrowserProcess(callback, syncResult, semaphore); 73 semaphore.acquire(); 83 final SyncResult syncResult, Semaphore semaphore) { 107 semaphore.release() [all...] |
/external/chromium_org/third_party/angle/src/common/ |
tls.h | 19 # include <semaphore.h>
|
/external/deqp/framework/platform/android/ |
tcuAndroidRenderActivity.hpp | 52 MESSAGE_SYNC, //!< Main thread requests sync. Data argument is de::Semaphore* that needs to be incremented. 64 de::Semaphore* semaphore; member in union:tcu::Android::Message::__anon24387 99 Message (MessageType type_, de::Semaphore* semaphore) 103 DE_ASSERT(semaphore); 104 payload.semaphore = semaphore;
|
/external/bluetooth/bluedroid/osi/test/ |
alarm_test.cpp | 8 #include "semaphore.h" 13 static semaphore_t *semaphore; variable 37 semaphore = semaphore_new(0); 54 semaphore_post(semaphore); 138 semaphore_wait(semaphore); 153 semaphore_wait(semaphore); 173 semaphore_wait(semaphore); 178 semaphore_wait(semaphore); 199 semaphore_wait(semaphore); 204 semaphore_wait(semaphore); [all...] |
/external/jmdns/src/javax/jmdns/impl/ |
DNSStatefulObject.java | 7 import java.util.concurrent.Semaphore; 25 * This class define a semaphore. On this multiple threads can wait the arrival of one event. Thread wait for a maximum defined by the timeout. 27 * Implementation note: this class is based on {@link java.util.concurrent.Semaphore} so that they can be released by the timeout timer. 37 private final ConcurrentMap<Thread, Semaphore> _semaphores; 41 * Semaphore name for debugging purposes. 46 _semaphores = new ConcurrentHashMap<Thread, Semaphore>(50); 57 Semaphore semaphore = _semaphores.get(thread); local 58 if (semaphore == null) { 59 semaphore = new Semaphore(1, true) [all...] |
/cts/tests/tests/textureview/src/android/textureview/cts/ |
GLProducerThread.java | 23 import java.util.concurrent.Semaphore; 40 private final Semaphore mSemaphore; 59 int frames, int delayMs, Semaphore semaphore) { 63 mSemaphore = semaphore; 69 Semaphore semaphore) { 70 this(surfaceTexture, renderer, null, frames, delayMs, semaphore); 74 int delayMs, Semaphore semaphore) { [all...] |
/external/chromium_org/native_client_sdk/src/libraries/sdk_util/ |
thread_pool.h | 11 #include <semaphore.h>
|
/external/chromium_org/v8/test/cctest/ |
test-threads.cc | 129 v8::base::Semaphore* semaphore) 134 semaphore_(semaphore) {} 153 v8::base::Semaphore* semaphore_; 161 v8::base::Semaphore semaphore(0); 165 new ThreadIdValidationThread(prev, &refs, i, &semaphore); 172 semaphore.Wait();
|
test-circular-queue.cc | 109 v8::base::Semaphore* finished) 131 v8::base::Semaphore* finished_; 144 v8::base::Semaphore semaphore(0); 146 ProducerThread producer1(&scq, kRecordsPerChunk, 1, &semaphore); 147 ProducerThread producer2(&scq, kRecordsPerChunk, 10, &semaphore); 148 ProducerThread producer3(&scq, kRecordsPerChunk, 20, &semaphore); 152 semaphore.Wait(); 164 semaphore.Wait(); 176 semaphore.Wait() [all...] |
/external/compiler-rt/test/tsan/ |
vptr_benign_race.cc | 3 #include <semaphore.h>
|
vptr_harmful_race.cc | 3 #include <semaphore.h>
|