Home
last modified time | relevance | path

Searched refs:semaphore (Results 1 – 10 of 10) sorted by relevance

/system/bt/osi/test/
Dsemaphore_test.cpp16 semaphore_t *semaphore; member
25 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() local
36 ASSERT_TRUE(semaphore != NULL); in TEST_F()
37 semaphore_free(semaphore); in TEST_F()
41 semaphore_t *semaphore = semaphore_new(3); in TEST_F() local
42 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 …]
Dalarm_test.cpp31 static semaphore_t *semaphore; variable
48 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 …]
/system/bt/osi/src/
Dsemaphore.c54 void semaphore_free(semaphore_t *semaphore) { in semaphore_free() argument
55 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() argument
64 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 …]
Dfuture.c32 semaphore_t *semaphore; // NULL semaphore means immediate future member
41 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()
/system/bt/btif/src/
Dstack_manager.c69 semaphore_t *semaphore = semaphore_new(0); in init_stack() local
70 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() local
87 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() local
121 if (semaphore) in event_init_stack()
[all …]
/system/bt/osi/include/
Dsemaphore.h33 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);
/system/extras/perfprofd/tests/
Dperfprofd_test.cc163 std::string semaphore(test_dir); in remove_semaphore_file() local
164 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() local
171 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()
/system/bt/osi/
DBUILD.gn40 "src/semaphore.c",
DAndroid.mk48 ./src/semaphore.c \
/system/sepolicy/
Ddomain.te404 # For example, there is no way to automatically release a SysV semaphore