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

/system/bt/osi/test/
H A Dsemaphore_test.cc11 #include "osi/include/semaphore.h"
15 semaphore_t* semaphore; member in struct:SemaphoreTestSequenceHelper
24 CHECK(helper->semaphore);
27 semaphore_post(helper->semaphore);
34 semaphore_t* semaphore = semaphore_new(0); local
35 ASSERT_TRUE(semaphore != NULL);
36 semaphore_free(semaphore);
40 semaphore_t* semaphore = semaphore_new(3); local
41 ASSERT_TRUE(semaphore != NULL);
43 EXPECT_TRUE(semaphore_try_wait(semaphore));
52 semaphore_t* semaphore = semaphore_new(0); local
64 semaphore_t* semaphore = semaphore_new(0); local
72 semaphore_t* semaphore = semaphore_new(0); local
[all...]
H A Dalarm_test.cc28 #include "osi/include/semaphore.h"
34 static semaphore_t* semaphore; variable
69 semaphore = semaphore_new(0);
73 semaphore_free(semaphore);
80 semaphore_post(semaphore);
87 semaphore_post(semaphore);
133 semaphore_wait(semaphore);
150 semaphore_wait(semaphore);
169 semaphore_wait(semaphore);
187 semaphore_wait(semaphore);
[all...]
/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
41 // |semaphore| may not be NULL.
42 bool semaphore_try_wait(semaphore_t* semaphore);
[all...]
/system/bt/osi/src/
H A Dsemaphore.cc21 #include "osi/include/semaphore.h"
47 LOG_ERROR(LOG_TAG, "%s unable to allocate semaphore: %s", __func__,
55 void semaphore_free(semaphore_t* semaphore) { argument
56 if (!semaphore) return;
58 if (semaphore->fd != INVALID_FD) close(semaphore->fd);
59 osi_free(semaphore);
62 void semaphore_wait(semaphore_t* semaphore) { argument
63 CHECK(semaphore != NULL);
64 CHECK(semaphore
72 semaphore_try_wait(semaphore_t* semaphore) argument
98 semaphore_post(semaphore_t* semaphore) argument
107 semaphore_get_fd(const semaphore_t* semaphore) argument
[all...]
H A Dfuture.cc28 #include "osi/include/semaphore.h"
32 semaphore_t* semaphore; // NULL semaphore means immediate future member in struct:future_t
41 ret->semaphore = semaphore_new(0);
42 if (!ret->semaphore) {
43 LOG_ERROR(LOG_TAG, "%s unable to allocate memory for the semaphore.",
69 semaphore_post(future->semaphore);
75 // If the future is immediate, it will not have a semaphore
76 if (future->semaphore) semaphore_wait(future->semaphore);
[all...]
/system/bt/btif/src/
H A Dstack_manager.cc32 #include "osi/include/semaphore.h"
69 semaphore_t* semaphore = semaphore_new(0); local
70 thread_post(management_thread, event_init_stack, semaphore);
71 semaphore_wait(semaphore);
72 semaphore_free(semaphore);
86 semaphore_t* semaphore = semaphore_new(0); local
87 thread_post(management_thread, event_clean_up_stack, semaphore);
88 semaphore_wait(semaphore);
89 semaphore_free(semaphore);
98 semaphore_t* semaphore local
219 semaphore_t* semaphore = (semaphore_t*)context; local
[all...]
/system/bt/include/
H A Dbte.h28 #include <semaphore.h>
/system/nfc/halimpl/pn54x/common/
H A DphNfcCommon.h18 * OSAL header files related to memory, debug, random, semaphore and mutex
34 #include <semaphore.h>
/system/nfc/halimpl/pn54x/utils/
H A DphNxpNciHal_utils.h25 #include <semaphore.h>
/system/bt/stack/test/
H A Dstack_btu_test.cc24 #include <semaphore.h>
/system/extras/perfprofd/tests/
H A Dperfprofd_test.cc196 std::string semaphore(test_dir);
197 semaphore += "/" SEMAPHORE_FILENAME;
198 unlink(semaphore.c_str());
203 std::string semaphore(test_dir);
204 semaphore += "/" SEMAPHORE_FILENAME;
205 close(open(semaphore.c_str(), O_WRONLY|O_CREAT, 0600));
381 // passes, then it creates a semaphore file for the daemon to pick
404 I: profile collection skipped (missing semaphore file)
431 // Create semaphore file
468 // Create semaphore fil
[all...]
/system/core/libsuspend/
H A Dautosuspend_wakeup_count.c23 #include <semaphore.h>
89 ALOGE("Error waiting on semaphore: %s\n", buf);
114 ALOGE("Error releasing semaphore: %s\n", buf);
131 ALOGE("Error changing semaphore: %s\n", buf);
150 ALOGE("Error changing semaphore: %s\n", buf);
194 ALOGE("Error creating semaphore: %s\n", buf);
/system/nfc/halimpl/pn54x/tml/
H A DphDal4Nfc_messageQueueLib.c27 #include <semaphore.h>
92 NXPLOG_TML_E("Failed to destroy semaphore (errno=0x%08x)", errno);
/system/core/storaged/include/
H A Dstoraged.h20 #include <semaphore.h>
/system/core/logd/
H A Dmain.cpp22 #include <semaphore.h>
/system/core/liblog/tests/
H A Dliblog_test.cpp23 #include <semaphore.h>

Completed in 262 milliseconds