Searched refs:semaphore (Results 1 – 10 of 10) sorted by relevance
16 semaphore_t *semaphore; member25 assert(helper->semaphore); in sleep_then_increment_counter()28 semaphore_post(helper->semaphore); in sleep_then_increment_counter()35 semaphore_t *semaphore = semaphore_new(0); in TEST_F() local36 ASSERT_TRUE(semaphore != NULL); in TEST_F()37 semaphore_free(semaphore); in TEST_F()41 semaphore_t *semaphore = semaphore_new(3); in TEST_F() local42 ASSERT_TRUE(semaphore != NULL); in TEST_F()44 EXPECT_TRUE(semaphore_try_wait(semaphore)); in TEST_F()45 EXPECT_TRUE(semaphore_try_wait(semaphore)); in TEST_F()[all …]
31 static semaphore_t *semaphore; variable48 semaphore = semaphore_new(0); in SetUp()52 semaphore_free(semaphore); in TearDown()59 semaphore_post(semaphore); in cb()67 semaphore_post(semaphore); in ordered_cb()115 semaphore_wait(semaphore); in TEST_F()132 semaphore_wait(semaphore); in TEST_F()151 semaphore_wait(semaphore); in TEST_F()169 semaphore_wait(semaphore); in TEST_F()189 semaphore_wait(semaphore); in TEST_F()[all …]
54 void semaphore_free(semaphore_t *semaphore) { in semaphore_free() argument55 if (!semaphore) in semaphore_free()58 if (semaphore->fd != INVALID_FD) in semaphore_free()59 close(semaphore->fd); in semaphore_free()60 osi_free(semaphore); in semaphore_free()63 void semaphore_wait(semaphore_t *semaphore) { in semaphore_wait() argument64 assert(semaphore != NULL); in semaphore_wait()65 assert(semaphore->fd != INVALID_FD); in semaphore_wait()68 if (eventfd_read(semaphore->fd, &value) == -1) in semaphore_wait()72 bool semaphore_try_wait(semaphore_t *semaphore) { in semaphore_try_wait() argument[all …]
32 semaphore_t *semaphore; // NULL semaphore means immediate future member41 ret->semaphore = semaphore_new(0); in future_new()42 if (!ret->semaphore) { in future_new()68 semaphore_post(future->semaphore); in future_ready()75 if (future->semaphore) in future_await()76 semaphore_wait(future->semaphore); in future_await()87 semaphore_free(future->semaphore); in future_free()
69 semaphore_t *semaphore = semaphore_new(0); in init_stack() local70 thread_post(management_thread, event_init_stack, semaphore); in init_stack()71 semaphore_wait(semaphore); in init_stack()72 semaphore_free(semaphore); in init_stack()86 semaphore_t *semaphore = semaphore_new(0); in clean_up_stack() local87 thread_post(management_thread, event_clean_up_stack, semaphore); in clean_up_stack()88 semaphore_wait(semaphore); in clean_up_stack()89 semaphore_free(semaphore); in clean_up_stack()100 semaphore_t *semaphore = (semaphore_t *)context; in event_init_stack() local121 if (semaphore) in event_init_stack()[all …]
33 void semaphore_free(semaphore_t *semaphore);37 void semaphore_wait(semaphore_t *semaphore);42 bool semaphore_try_wait(semaphore_t *semaphore);45 void semaphore_post(semaphore_t *semaphore);57 int semaphore_get_fd(const semaphore_t *semaphore);
163 std::string semaphore(test_dir); in remove_semaphore_file() local164 semaphore += "/" SEMAPHORE_FILENAME; in remove_semaphore_file()165 unlink(semaphore.c_str()); in remove_semaphore_file()170 std::string semaphore(test_dir); in create_semaphore_file() local171 semaphore += "/" SEMAPHORE_FILENAME; in create_semaphore_file()172 close(open(semaphore.c_str(), O_WRONLY|O_CREAT)); in create_semaphore_file()362 I: profile collection skipped (missing semaphore file) in TEST_F()
40 "src/semaphore.c",
48 ./src/semaphore.c \
404 # For example, there is no way to automatically release a SysV semaphore