Home
last modified time | relevance | path

Searched refs:sem_wait (Results 1 - 25 of 131) sorted by relevance

123456

/third_party/ltp/testcases/open_posix_testsuite/functional/semaphores/
H A Dsem_sleepingbarber.c37 sem_wait(&print); \
57 if (-1 == sem_wait(&lock)) { in barbers()
58 perror("sem_wait(&lock) didn't return success"); in barbers()
69 if (-1 == sem_wait(&customer)) { in barbers()
70 perror("sem_wait(&customer) didn't return success"); in barbers()
73 if (-1 == sem_wait(&lock)) { in barbers()
74 perror("sem_wait(&lock) didn't return success"); in barbers()
104 if (-1 == sem_wait(&lock)) { in customers()
105 perror("sem_wait(&lock) didn't return success"); in customers()
121 if (-1 == sem_wait( in customers()
[all...]
H A Dsem_readerwriter.c51 if (-1 == sem_wait(&r_lock)) { in reader()
52 perror("sem_wait didn't return success\n"); in reader()
58 if (-1 == sem_wait(&w_lock)) { in reader()
59 perror("sem_wait didn't return success \n"); in reader()
69 if (-1 == sem_wait(&r_lock)) { in reader()
70 perror("sem_wait didn't return success \n"); in reader()
95 if (-1 == sem_wait(&w_lock)) { in writer()
96 perror("sem_wait didn't return success \n"); in writer()
H A Dsem_conpro.c44 if (-1 == sem_wait(&buf->occupied)) { in producer()
45 perror("sem_wait didn't return success \n"); in producer()
48 if (-1 == sem_wait(&buf->lock)) { in producer()
49 perror("sem_wait didn't return success \n"); in producer()
57 perror("sem_wait didn't return success \n"); in producer()
61 perror("sem_wait didn't return success \n"); in producer()
74 if (-1 == sem_wait(&buf->empty)) { in consumer()
75 perror("sem_wait didn't return success \n"); in consumer()
78 if (-1 == sem_wait(&buf->lock)) { in consumer()
79 perror("sem_wait did in consumer()
[all...]
H A Dsem_philosopher.c78 if (-1 == sem_wait(&lock)) { in philosopher()
79 perror("sem_wait didn't return success \n"); in philosopher()
88 if (-1 == sem_wait(&ph[PhID])) { in philosopher()
89 perror("sem_wait didn't return success \n"); in philosopher()
94 if (-1 == sem_wait(&lock)) { in philosopher()
95 perror("sem_wait didn't return success \n"); in philosopher()
/third_party/musl/src/thread/
H A Dsynccall.c29 sem_wait(&target_sem); in handler()
36 sem_wait(&target_sem); in handler()
89 sem_wait(&caller_sem); in __synccall()
98 sem_wait(&caller_sem); in __synccall()
112 sem_wait(&caller_sem); in __synccall()
/third_party/ltp/testcases/open_posix_testsuite/stress/semaphores/
H A Dmulti_con_pro.c49 if (-1 == sem_wait(&buf->full)) { in producer()
50 perror("sem_wait didn't return success \n"); in producer()
58 if (-1 == sem_wait(&buf->lock)) { in producer()
59 perror("sem_wait didn't return success \n"); in producer()
68 perror("sem_wait didn't return success \n"); in producer()
72 perror("sem_wait didn't return success \n"); in producer()
76 if (-1 == sem_wait(&buf->full)) { in producer()
77 perror("sem_wait didn't return success \n"); in producer()
85 if (-1 == sem_wait(&buf->lock)) { in producer()
86 perror("sem_wait did in producer()
[all...]
/third_party/NuttX/drivers/pipes/
H A Dpipe_common.c86 ret = sem_wait(sem); in pipecommon_semtake()
182 * sem_wait() call should fail only if we are awakened by a signal. in pipecommon_open()
185 ret = sem_wait(&dev->d_bfsem); in pipecommon_open()
188 PRINT_ERR("ERROR: sem_wait failed: %d\n", ret); in pipecommon_open()
254 ret = sem_wait(&dev->d_rdsem); in pipecommon_open()
257 /* The sem_wait() call should fail only if we are awakened by in pipecommon_open()
261 PRINT_ERR("ERROR: sem_wait failed: %d\n", ret); in pipecommon_open()
402 ret = sem_wait(&dev->d_bfsem); in pipecommon_read()
431 ret = sem_wait(&dev->d_rdsem); in pipecommon_read()
433 if (ret < 0 || (ret = sem_wait( in pipecommon_read()
[all...]
H A Dpipe.c119 ret = sem_wait(&g_pipesem); in pipe_free()
174 (void)sem_wait(&g_pipesem); in pipe_unlink()
254 ret = sem_wait(&g_pipesem); in pipe()
342 (void)sem_wait(&g_pipesem); in pipe()
/third_party/musl/libc-test/src/functional/
H A Dsem_init.c35 T(sem_wait(s)); in many_waiters()
36 T(sem_wait(s)); in many_waiters()
37 T(sem_wait(s)); in many_waiters()
61 T(sem_wait(&s)); in single_thread()
H A Dpthread_cancel-points.c35 TESTR(sem_wait(&sem_test), "waiting on semaphore in the canceled thread"); in execute_sem_wait()
50 while (sem_wait(&sem_test)); in run_test()
104 {1, prepare_sem, execute_sem_wait, cleanup_sem, 0, "blocking sem_wait"},
105 {1, prepare_sem, execute_sem_wait, cleanup_sem, (void*)1, "non-blocking sem_wait"},
117 while (sem_wait(&sem_seq)); in run_execute()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/
H A D7-1.c9 /* sem_wait hangs when it tries to lock a locked semaphore, and then killed
24 #define FUNCTION "sem_wait"
49 if (sem_wait(mysemp) == -1) { in main()
50 perror(ERROR_PREFIX "sem_wait"); in main()
69 sem_wait(mysemp); in main()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_init/
H A D3-1.c36 sem_wait(&psem); in producer()
48 sem_wait(&csem); in consumer()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/
H A D1-2.c149 if ((ret = sem_wait(&semB))) { in unlock_issue()
242 if ((ret = sem_wait(&semA))) { in main()
294 if ((ret = sem_wait(&semA))) { in main()
H A D3-2.c155 if ((ret = sem_wait(&semB))) { in unlock_issue()
235 if ((ret = sem_wait(&semA))) { in main()
287 if ((ret = sem_wait(&semA))) { in main()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_post/
H A D8-1.c101 sem_wait(sem_1); in child_fn()
103 if (sem_wait(sem) == -1) { in child_fn()
104 perror("Error at sem_wait"); in child_fn()
152 if (sem_wait(sem) == -1) { in main()
153 perror("sem_wait()"); in main()
/third_party/backends/backend/
H A Dsnapscan-mutex.c116 static struct sembuf sem_wait = { 0, -1, 0 }; variable
173 semop(*sem_id, &sem_wait, 1); in snapscani_mutex_lock()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_destroy/
H A D3-1.c86 sem_wait(&psem); in producer()
98 sem_wait(&csem); in consumer()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/
H A D2-3.c125 ret = sem_wait(&(data.semB)); in clnp2()
368 ret = sem_wait(&(data.semA)); in main()
397 ret = sem_wait(&(data.semA)); in main()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/
H A D3-1.c109 if ((ret = sem_wait(thearg->sem))) { in sendsig()
266 ret = sem_wait(&semsync); in threaded()
311 ret = sem_wait(&semsync2); in main()
H A D5-1.c214 if (sem_wait(&semstart)) { /* Wait for the thread to be ready */ in main()
225 if ((ret = sem_wait(&semsig))) { in main()
H A D4-1.c196 if ((ret = sem_wait(&sem))) { in main()
209 if ((ret = sem_wait(&sem))) { in main()
/third_party/musl/libc-test/src/regression/
H A Dpthread_cancel-sem_wait.c0 // sem_wait and sem_timedwait are cancellation points
20 while (sem_wait(&sem1)); in wait_cancel()
28 sem_wait(&sem2); in start_sem_wait()
58 /* Cancellation on uncontended sem_wait */ in main()
63 TESTR(r, pthread_join(td, &res), "joining canceled thread after uncontended sem_wait"); in main()
64 TESTC(res == PTHREAD_CANCELED, "canceled thread exit status after uncontended sem_wait"); in main()
65 TESTC(seqno == 1, "uncontended sem_wait"); in main()
67 /* Cancellation on blocking sem_wait */ in main()
73 TESTR(r, pthread_join(td, &res), "joining canceled thread after blocking sem_wait"); in main()
74 TESTC(res == PTHREAD_CANCELED, "canceled thread exit status after blocking sem_wait"); in main()
[all...]
/third_party/ltp/testcases/kernel/syscalls/move_pages/
H A Dmove_pages05.c102 if (sem_wait(&sem[SEM_PARENT_TEST]) == -1) in child()
169 if (sem_wait(&sem[SEM_CHILD_SETUP]) == -1) in main()
H A Dmove_pages11.c102 if (sem_wait(&sem[SEM_PARENT_TEST]) == -1) in child()
164 if (sem_wait(&sem[SEM_CHILD_SETUP]) == -1) in main()
H A Dmove_pages03.c101 if (sem_wait(&sem[SEM_PARENT_TEST]) == -1) in child()
162 if (sem_wait(&sem[SEM_CHILD_SETUP]) == -1) in main()

Completed in 11 milliseconds

123456