Searched refs:semaphore (Results 1 - 13 of 13) sorted by relevance

/system/bt/osi/include/
H A Dsemaphore.h26 // Creates a new semaphore with an initial value of |value|.
31 // Frees a semaphore allocated with |semaphore_new|. |semaphore| may
33 void semaphore_free(semaphore_t *semaphore);
35 // Decrements the value of |semaphore|. If it is 0, this call blocks until
36 // it becomes non-zero. |semaphore| may not be NULL.
37 void semaphore_wait(semaphore_t *semaphore);
39 // Tries to decrement the value of |semaphore|. Returns true if the value was
40 // decremented, false if the value was 0. This function never blocks. |semaphore|
42 bool semaphore_try_wait(semaphore_t *semaphore);
[all...]
/system/bt/osi/src/
H A Dsemaphore.c31 #include "osi/include/semaphore.h"
46 LOG_ERROR("%s unable to allocate semaphore: %s", __func__, strerror(errno));
54 void semaphore_free(semaphore_t *semaphore) { argument
55 if (!semaphore)
58 if (semaphore->fd != INVALID_FD)
59 close(semaphore->fd);
60 osi_free(semaphore);
63 void semaphore_wait(semaphore_t *semaphore) { argument
64 assert(semaphore != NULL);
65 assert(semaphore
72 semaphore_try_wait(semaphore_t *semaphore) argument
95 semaphore_post(semaphore_t *semaphore) argument
103 semaphore_get_fd(const semaphore_t *semaphore) argument
[all...]
H A Dfuture.c27 #include "osi/include/semaphore.h"
31 semaphore_t *semaphore; // NULL semaphore means immediate future member in struct:future_t
44 ret->semaphore = semaphore_new(0);
45 if (!ret->semaphore) {
46 LOG_ERROR("%s unable to allocate memory for the semaphore.", __func__);
78 semaphore_post(future->semaphore);
84 // If the future is immediate, it will not have a semaphore
85 if (future->semaphore)
86 semaphore_wait(future->semaphore);
[all...]
/system/bt/test/suite/support/
H A Dcallbacks.h23 #include <semaphore.h>
27 sem_t *semaphore = callbacks_get_semaphore(#callback); \
28 sem_wait(semaphore); \
33 sem_t *semaphore = callbacks_get_semaphore(#callback); \
34 while (!sem_trywait(semaphore)); \
36 sem_wait(semaphore); \
42 sem_t *semaphore = callbacks_get_semaphore(__func__); \
43 sem_post(semaphore); \
H A Dcallbacks.c75 sem_t semaphore; member in struct:__anon1292
212 sem_init(&callback_data[i].semaphore, 0, 0);
218 sem_destroy(&callback_data[i].semaphore);
237 return &callback_data[i].semaphore;
/system/bt/osi/test/
H A Dalarm_test.cpp26 #include "semaphore.h"
29 static semaphore_t *semaphore; variable
44 semaphore = semaphore_new(0);
48 semaphore_free(semaphore);
55 semaphore_post(semaphore);
102 semaphore_wait(semaphore);
117 semaphore_wait(semaphore);
137 semaphore_wait(semaphore);
142 semaphore_wait(semaphore);
163 semaphore_wait(semaphore);
[all...]
/system/bt/btif/src/
H A Dstack_manager.c30 #include "osi/include/semaphore.h"
66 semaphore_t *semaphore = semaphore_new(0); local
67 thread_post(management_thread, event_init_stack, semaphore);
68 semaphore_wait(semaphore);
69 semaphore_free(semaphore);
92 semaphore_t *semaphore = (semaphore_t *)context; local
105 if (semaphore)
106 semaphore_post(semaphore);
112 // No semaphore needed since we are calling it directly
/system/bt/include/
H A Dbte.h27 #include <semaphore.h>
/system/extras/tests/bionic/libc/bionic/
H A Dtest_cond.c29 #include <semaphore.h>
/system/extras/perfprofd/tests/
H A Dperfprofd_test.cc162 std::string semaphore(test_dir);
163 semaphore += "/" SEMAPHORE_FILENAME;
164 unlink(semaphore.c_str());
169 std::string semaphore(test_dir);
170 semaphore += "/" SEMAPHORE_FILENAME;
171 close(open(semaphore.c_str(), O_WRONLY|O_CREAT));
338 // passes, then it creates a semaphore file for the daemon to pick
361 I: profile collection skipped (missing semaphore file)
388 // Create semaphore file
425 // Create semaphore fil
[all...]
/system/bt/osi/
H A DAndroid.mk47 ./src/semaphore.c \
/system/core/libsuspend/
H A Dautosuspend_wakeup_count.c20 #include <semaphore.h>
73 ALOGE("Error waiting on semaphore: %s\n", buf);
99 ALOGE("Error releasing semaphore: %s\n", buf);
116 ALOGE("Error changing semaphore: %s\n", buf);
135 ALOGE("Error changing semaphore: %s\n", buf);
179 ALOGE("Error creating semaphore: %s\n", buf);
/system/core/logd/
H A Dmain.cpp22 #include <semaphore.h>

Completed in 120 milliseconds