/external/chromium_org/third_party/npapi/npspy/extern/nspr/obsolete/ |
prsem.h | 58 NSPR_API(void) PR_DestroySem(PRSemaphore *sem); variable 64 ** state of the semahore sem. The thread can proceed only if the counter value 65 ** of the semaphore sem is currently greater than 0. If the value of semaphore 66 ** sem is positive, it is decremented by one and the routine returns immediately 67 ** allowing the calling thread to continue. If the value of semaphore sem is 0, 74 NSPR_API(PRStatus) PR_WaitSem(PRSemaphore *sem); variable 81 NSPR_API(void) PR_PostSem(PRSemaphore *sem); variable 84 ** Returns the value of the semaphore referenced by sem without affecting 89 NSPR_API(PRUintn) PR_GetValueSem(PRSemaphore *sem); variable
|
/external/v8/test/cctest/ |
test-lock.cc | 45 Semaphore* sem = OS::CreateSemaphore(0); local 48 ok = sem->Wait(0); 50 ok = sem->Wait(100); 52 ok = sem->Wait(1000); 56 sem->Signal(); 57 ok = sem->Wait(0); 58 sem->Signal(); 59 ok = sem->Wait(100); 60 sem->Signal(); 61 ok = sem->Wait(1000) [all...] |
/external/chromium_org/third_party/npapi/npspy/extern/nspr/ |
pripcsem.h | 102 NSPR_API(PRStatus) PR_WaitSemaphore(PRSem *sem); variable 110 NSPR_API(PRStatus) PR_PostSemaphore(PRSem *sem); variable 118 NSPR_API(PRStatus) PR_CloseSemaphore(PRSem *sem); variable
|
/external/qemu/distrib/sdl-1.2.15/src/thread/dc/ |
SDL_syssem.c | 42 void SDL_DestroySemaphore(SDL_sem *sem) 47 int SDL_SemTryWait(SDL_sem *sem) 53 int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout) 59 int SDL_SemWait(SDL_sem *sem) 65 Uint32 SDL_SemValue(SDL_sem *sem) 70 int SDL_SemPost(SDL_sem *sem) 78 #include <kos/sem.h> 82 semaphore_t sem; member in struct:SDL_semaphore 93 void SDL_DestroySemaphore(SDL_sem *sem) 95 if ( ! sem ) { [all...] |
/external/qemu/distrib/sdl-1.2.15/src/thread/generic/ |
SDL_sysmutex.c | 33 SDL_sem *sem; member in struct:SDL_mutex 45 mutex->sem = SDL_CreateSemaphore(1); 48 if ( ! mutex->sem ) { 62 if ( mutex->sem ) { 63 SDL_DestroySemaphore(mutex->sem); 90 SDL_SemWait(mutex->sem); 125 SDL_SemPost(mutex->sem);
|
SDL_syssem.c | 39 void SDL_DestroySemaphore(SDL_sem *sem) 44 int SDL_SemTryWait(SDL_sem *sem) 50 int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout) 56 int SDL_SemWait(SDL_sem *sem) 62 Uint32 SDL_SemValue(SDL_sem *sem) 67 int SDL_SemPost(SDL_sem *sem) 85 SDL_sem *sem; local 87 sem = (SDL_sem *)SDL_malloc(sizeof(*sem)); 88 if ( ! sem ) { [all...] |
/external/chromium_org/native_client_sdk/src/libraries/third_party/pthreads-win32/ |
sem_timedwait.c | 50 sem_t sem; member in struct:__anon8826 59 sem_t s = a->sem; 71 if (WaitForSingleObject(s->sem, 0) == WAIT_OBJECT_0) 98 sem_timedwait (sem_t * sem, const struct timespec *abstime) 106 * sem 128 * EINVAL 'sem' is not a valid semaphore, 138 sem_t s = *sem; 142 if (sem == NULL) 168 if (*sem == NULL) 185 cleanup_args.sem = s [all...] |
/external/chromium_org/net/third_party/nss/ssl/ |
sslmutex.h | 80 sem_t sem; member in union:__anon9519::__anon9520 106 extern SECStatus sslMutex_Init(sslMutex *sem, int shared); 111 extern SECStatus sslMutex_Destroy(sslMutex *sem, PRBool processLocal); 113 extern SECStatus sslMutex_Unlock(sslMutex *sem); 115 extern SECStatus sslMutex_Lock(sslMutex *sem); 119 extern SECStatus sslMutex_2LevelInit(sslMutex *sem);
|
/external/qemu/distrib/sdl-1.2.15/src/thread/beos/ |
SDL_syssem.c | 38 SDL_sem *sem; local 40 sem = (SDL_sem *)SDL_malloc(sizeof(*sem)); 41 if ( sem ) { 42 sem->id = create_sem(initial_value, "SDL semaphore"); 43 if ( sem->id < B_NO_ERROR ) { 45 SDL_free(sem); 46 sem = NULL; 51 return(sem); 55 void SDL_DestroySemaphore(SDL_sem *sem) [all...] |
/external/qemu/distrib/sdl-1.2.15/src/thread/pthread/ |
SDL_syssem.c | 40 sem_t sem; member in struct:SDL_semaphore 46 SDL_sem *sem = (SDL_sem *) SDL_malloc(sizeof(SDL_sem)); local 47 if ( sem ) { 48 if ( sem_init(&sem->sem, 0, initial_value) < 0 ) { 50 SDL_free(sem); 51 sem = NULL; 56 return sem; 59 void SDL_DestroySemaphore(SDL_sem *sem) 61 if ( sem ) { [all...] |
/external/qemu/distrib/sdl-1.2.15/src/thread/riscos/ |
SDL_syssem.c | 42 void SDL_DestroySemaphore(SDL_sem *sem) 47 int SDL_SemTryWait(SDL_sem *sem) 53 int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout) 59 int SDL_SemWait(SDL_sem *sem) 65 Uint32 SDL_SemValue(SDL_sem *sem) 70 int SDL_SemPost(SDL_sem *sem) 84 sem_t *sem; member in struct:SDL_semaphore 91 SDL_sem *sem = (SDL_sem *) SDL_malloc(sizeof(SDL_sem)); local 92 if ( sem ) { 93 if ( sem_init(&sem->sem_data, 0, initial_value) < 0 ) [all...] |
/external/qemu/distrib/sdl-1.2.15/src/thread/win32/ |
SDL_syssem.c | 48 SDL_sem *sem; local 50 /* Allocate sem memory */ 51 sem = (SDL_sem *)SDL_malloc(sizeof(*sem)); 52 if ( sem ) { 55 sem->id = CreateSemaphoreCE(NULL, initial_value, 32*1024, NULL); 57 sem->id = CreateSemaphore(NULL, initial_value, 32*1024, NULL); 59 sem->count = (LONG) initial_value; 60 if ( ! sem->id ) { 62 SDL_free(sem); [all...] |
/external/qemu/distrib/sdl-1.2.15/test/ |
testsem.c | 13 static SDL_sem *sem; variable 20 SDL_SemWait(sem); 21 fprintf(stderr, "Thread number %d has got the semaphore (value = %d)!\n", threadnum, SDL_SemValue(sem)); 23 SDL_SemPost(sem); 24 fprintf(stderr, "Thread number %d has released the semaphore (value = %d)!\n", threadnum, SDL_SemValue(sem)); 42 sem = SDL_CreateSemaphore(0); 46 SDL_SemWaitTimeout(sem, 2000); 78 sem = SDL_CreateSemaphore(init_sem); 97 SDL_DestroySemaphore(sem);
|
/external/valgrind/main/helgrind/tests/ |
tc24_nonzero_sem.c | 21 sem_t* sem = (sem_t*)semV; local 22 r= my_sem_wait(sem); assert(!r); 29 sem_t* sem; local 32 sem= my_sem_init("sem1", 0, N_THREADS); assert(sem); 35 r= pthread_create( &child[i], NULL, child_fn, sem ); 44 r= my_sem_destroy(sem); assert(!r);
|
/external/valgrind/main/memcheck/tests/ |
err_disable4.c | 29 sem_t sem; variable 48 int r = sem_wait(&sem); assert(!r); 56 int r = sem_wait(&sem); assert(!r); 76 r = sem_init(&sem, 0, 0); assert(!r); 90 r = sem_post(&sem); assert(!r); 113 r = sem_post(&sem); assert(!r);
|
/external/qemu/distrib/sdl-1.2.15/src/thread/irix/ |
SDL_syssem.c | 32 #include <sys/sem.h> 68 SDL_sem *sem; local 71 sem = (SDL_sem *)SDL_malloc(sizeof(*sem)); 72 if ( sem == NULL ) { 76 sem->id = semget(IPC_PRIVATE, 1, (0600|IPC_CREAT)); 77 if ( sem->id < 0 ) { 79 SDL_free(sem); 83 semctl(sem->id, 0, SETVAL, init); 84 return(sem); [all...] |
/external/qemu/distrib/sdl-1.2.15/src/thread/os2/ |
SDL_syssem.c | 45 SDL_sem *sem; local 48 /* Allocate sem memory */ 49 sem = (SDL_sem *)SDL_malloc(sizeof(*sem)); 50 if ( sem ) { 52 ulrc = DosCreateMutexSem(NULL,&(sem->id),0,TRUE); 55 SDL_free(sem); 56 sem = NULL; 59 DosCreateEventSem(NULL, &(sem->changed), 0, FALSE); 60 sem->value = initial_value [all...] |
/external/qemu/distrib/sdl-1.2.15/src/thread/symbian/ |
SDL_syssem.cpp | 73 SDL_semaphore* sem = new /*(ELeave)*/ SDL_semaphore; local 74 sem->handle = s.Handle(); 75 sem->count = initial_value; 76 return(sem); 80 void SDL_DestroySemaphore(SDL_sem *sem) 82 if ( sem ) 85 sema.SetHandle(sem->handle); 86 while(--sem->count) 89 delete sem; 90 sem = NULL [all...] |
/libcore/luni/src/test/java/libcore/java/lang/ |
OldThreadTest.java | 311 final Semaphore sem = new Semaphore(0); local 316 while (!sem.hasQueuedThreads()) {} 317 sem.release(); 324 sem.acquire(); 335 sem.release(); 349 sem.acquire(); 357 sem.release(); 363 sem.acquire();
|
/external/chromium/base/memory/ |
singleton_unittest.cc | 202 base::ShadowingAtExitManager sem; local 237 base::ShadowingAtExitManager sem; local
|
/external/chromium_org/base/memory/ |
singleton_unittest.cc | 211 base::ShadowingAtExitManager sem; local 245 base::ShadowingAtExitManager sem; local
|
/external/valgrind/unittest/ |
posix_tests.cc | 112 sem_t sem[2]; member in namespace:test75 116 sem_post(&sem[0]); 117 sem_post(&sem[1]); 121 sem_wait(&sem[0]); 126 sem_trywait(&sem[1]); 132 sem_init(&sem[0], 0, 0); 133 sem_init(&sem[1], 0, 0); 149 sem_destroy(&sem[0]); 150 sem_destroy(&sem[1]); 343 const char *kSemName = "drt-test-sem"; 351 sem_t *sem = sem_open(kSemName, O_CREAT, 0600, 3); local 367 sem_t *sem = DoSemOpen(); local 386 sem_t* sem = DoSemOpen(); local [all...] |
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/camera/ |
CameraFunctionalTest.java | 72 final Semaphore sem = new Semaphore(0); local 79 sem.release(); 85 if (!sem.tryAcquire(WAIT_TIMEOUT, TimeUnit.MILLISECONDS)) { 111 final Semaphore sem = new Semaphore(0); local 118 sem.release(); 122 if (!sem.tryAcquire(WAIT_TIMEOUT, TimeUnit.MILLISECONDS)) {
|
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/ |
CameraStressTest.java | 72 final Semaphore sem = new Semaphore(0); local 79 sem.release(); 85 if (!sem.tryAcquire(WAIT_TIMEOUT, TimeUnit.MILLISECONDS)) { 117 final Semaphore sem = new Semaphore(0); local 124 sem.release(); 128 if (!sem.tryAcquire(WAIT_TIMEOUT, TimeUnit.MILLISECONDS)) {
|
/hardware/ti/omap4xxx/camera/ |
ANativeWindowDisplayAdapter.cpp | 191 Semaphore sem; local 211 sem.Create(); 215 msg.arg1 = &sem; 221 sem.Wait(); 359 Semaphore sem; local 390 sem.Create(); 394 msg.arg1 = &sem; 400 sem.Wait(); 438 Semaphore sem; local 439 sem.Create() 1016 Semaphore &sem = *((Semaphore*)msg.arg1); local [all...] |