Home
last modified time | relevance | path

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

/system/bt/osi/test/
Dsemaphore_test.cc17 semaphore_t* semaphore; member
26 CHECK(helper->semaphore); in sleep_then_increment_counter()
29 semaphore_post(helper->semaphore); in sleep_then_increment_counter()
36 semaphore_t* semaphore = semaphore_new(0); in TEST_F() local
37 ASSERT_TRUE(semaphore != NULL); in TEST_F()
38 semaphore_free(semaphore); in TEST_F()
42 semaphore_t* semaphore = semaphore_new(3); in TEST_F() local
43 ASSERT_TRUE(semaphore != NULL); in TEST_F()
45 EXPECT_TRUE(semaphore_try_wait(semaphore)); in TEST_F()
46 EXPECT_TRUE(semaphore_try_wait(semaphore)); in TEST_F()
[all …]
Dalarm_test.cc35 static semaphore_t* semaphore; variable
54 semaphore = semaphore_new(0); in SetUp()
58 semaphore_free(semaphore); in TearDown()
65 semaphore_post(semaphore); in cb()
72 semaphore_post(semaphore); in ordered_cb()
118 semaphore_wait(semaphore); in TEST_F()
135 semaphore_wait(semaphore); in TEST_F()
154 semaphore_wait(semaphore); in TEST_F()
172 semaphore_wait(semaphore); in TEST_F()
190 semaphore_wait(semaphore); in TEST_F()
[all …]
/system/bt/osi/src/
Dsemaphore.cc54 void semaphore_free(semaphore_t* semaphore) { in semaphore_free() argument
55 if (!semaphore) return; in semaphore_free()
57 if (semaphore->fd != INVALID_FD) close(semaphore->fd); in semaphore_free()
58 osi_free(semaphore); in semaphore_free()
61 void semaphore_wait(semaphore_t* semaphore) { in semaphore_wait() argument
62 CHECK(semaphore != NULL); in semaphore_wait()
63 CHECK(semaphore->fd != INVALID_FD); in semaphore_wait()
66 if (eventfd_read(semaphore->fd, &value) == -1) in semaphore_wait()
70 bool semaphore_try_wait(semaphore_t* semaphore) { in semaphore_try_wait() argument
71 CHECK(semaphore != NULL); in semaphore_try_wait()
[all …]
Dfuture.cc32 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) semaphore_wait(future->semaphore); in future_await()
85 semaphore_free(future->semaphore); in future_free()
/system/bt/btif/src/
Dstack_manager.cc71 semaphore_t* semaphore = semaphore_new(0); in init_stack() local
73 base::Bind(event_init_stack, semaphore)); in init_stack()
74 semaphore_wait(semaphore); in init_stack()
75 semaphore_free(semaphore); in init_stack()
91 semaphore_t* semaphore = semaphore_new(0); in clean_up_stack() local
93 base::Bind(event_clean_up_stack, semaphore)); in clean_up_stack()
94 semaphore_wait(semaphore); in clean_up_stack()
95 semaphore_free(semaphore); in clean_up_stack()
105 semaphore_t* semaphore = (semaphore_t*)context; in event_init_stack() local
128 if (semaphore) semaphore_post(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/bt/osi/test/fuzzers/alarm/
Dfuzz_alarm.cc32 static semaphore_t* semaphore; variable
40 semaphore_post(semaphore); in cb()
45 semaphore = semaphore_new(0); in setup()
47 void teardown() { semaphore_free(semaphore); } in teardown()
133 semaphore_wait(semaphore); in LLVMFuzzerTestOneInput()
/system/bt/osi/
DBUILD.gn35 "src/semaphore.cc",
DAndroid.bp62 "src/semaphore.cc",
/system/sepolicy/prebuilts/api/27.0/public/
Ddomain.te788 # For example, there is no way to automatically release a SysV semaphore
/system/sepolicy/prebuilts/api/26.0/public/
Ddomain.te795 # For example, there is no way to automatically release a SysV semaphore
/system/sepolicy/public/
Ddomain.te1109 # For example, there is no way to automatically release a SysV semaphore
/system/sepolicy/prebuilts/api/28.0/public/
Ddomain.te1092 # For example, there is no way to automatically release a SysV semaphore
/system/sepolicy/prebuilts/api/29.0/public/
Ddomain.te1091 # For example, there is no way to automatically release a SysV semaphore
/system/sepolicy/prebuilts/api/30.0/public/
Ddomain.te1085 # For example, there is no way to automatically release a SysV semaphore