Lines Matching refs:sem
30 uv_sem_t sem; member
44 uv_sem_post(&c->sem); in worker()
56 ASSERT_OK(uv_sem_init(&wc.sem, 0)); in TEST_IMPL()
63 uv_sem_wait(&wc.sem); /* should not block */ in TEST_IMPL()
68 uv_sem_destroy(&wc.sem); in TEST_IMPL()
81 ASSERT_OK(uv_sem_init(&wc.sem, 0)); in TEST_IMPL()
85 uv_sem_wait(&wc.sem); in TEST_IMPL()
89 uv_sem_destroy(&wc.sem); in TEST_IMPL()
96 uv_sem_t sem; in TEST_IMPL() local
98 ASSERT_OK(uv_sem_init(&sem, 3)); in TEST_IMPL()
99 uv_sem_wait(&sem); /* should not block */ in TEST_IMPL()
100 uv_sem_wait(&sem); /* should not block */ in TEST_IMPL()
101 ASSERT_OK(uv_sem_trywait(&sem)); in TEST_IMPL()
102 ASSERT_EQ(UV_EAGAIN, uv_sem_trywait(&sem)); in TEST_IMPL()
104 uv_sem_post(&sem); in TEST_IMPL()
105 ASSERT_OK(uv_sem_trywait(&sem)); in TEST_IMPL()
106 ASSERT_EQ(UV_EAGAIN, uv_sem_trywait(&sem)); in TEST_IMPL()
108 uv_sem_destroy(&sem); in TEST_IMPL()