HomeSort by relevance Sort by last modified time
    Searched full:semaphore (Results 1 - 25 of 1401) sorted by null

1 2 3 4 5 6 7 8 91011>>

  /system/bt/osi/test/
semaphore_test.cc 11 #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...]
  /external/ltp/testcases/open_posix_testsuite/stress/semaphores/
coverage.txt 1 This file defines the coverage for Semaphore stress tests.
  /frameworks/data-binding/integration-tests/TestApp/app/src/androidTestApi7/java/android/databinding/testapp/
InvalidateAllTest.java 8 import java.util.concurrent.Semaphore;
18 final Semaphore semaphore = new Semaphore(1); local
19 semaphore.acquire();
29 semaphore.release();
34 assertTrue(semaphore.tryAcquire(2, TimeUnit.SECONDS));
40 assertTrue(semaphore.tryAcquire(2, TimeUnit.SECONDS));
  /system/bt/osi/include/
semaphore.h 26 // 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/
semaphore.cc 21 #include "osi/include/semaphore.h"
47 LOG_ERROR(LOG_TAG, "%s unable to allocate semaphore: %s", __func__,
55 void semaphore_free(semaphore_t* semaphore) {
56 if (!semaphore) return;
58 if (semaphore->fd != INVALID_FD) close(semaphore->fd);
59 osi_free(semaphore);
62 void semaphore_wait(semaphore_t* semaphore) {
63 CHECK(semaphore != NULL);
64 CHECK(semaphore->fd != INVALID_FD)
    [all...]
future.cc 28 #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...]
  /external/skia/src/gpu/ops/
GrSemaphoreOp.cpp 17 static std::unique_ptr<GrSignalSemaphoreOp> Make(sk_sp<GrSemaphore> semaphore,
20 return std::unique_ptr<GrSignalSemaphoreOp>(new GrSignalSemaphoreOp(std::move(semaphore),
28 explicit GrSignalSemaphoreOp(sk_sp<GrSemaphore> semaphore, GrRenderTargetProxy* proxy,
30 : INHERITED(ClassID(), std::move(semaphore), proxy), fForceFlush(forceFlush) {}
45 static std::unique_ptr<GrWaitSemaphoreOp> Make(sk_sp<GrSemaphore> semaphore,
47 return std::unique_ptr<GrWaitSemaphoreOp>(new GrWaitSemaphoreOp(std::move(semaphore),
54 explicit GrWaitSemaphoreOp(sk_sp<GrSemaphore> semaphore, GrRenderTargetProxy* proxy)
55 : INHERITED(ClassID(), std::move(semaphore), proxy) {}
66 std::unique_ptr<GrSemaphoreOp> GrSemaphoreOp::MakeSignal(sk_sp<GrSemaphore> semaphore,
69 return GrSignalSemaphoreOp::Make(std::move(semaphore), proxy, forceFlush)
    [all...]
  /external/skqp/src/gpu/ops/
GrSemaphoreOp.cpp 17 static std::unique_ptr<GrSignalSemaphoreOp> Make(sk_sp<GrSemaphore> semaphore,
20 return std::unique_ptr<GrSignalSemaphoreOp>(new GrSignalSemaphoreOp(std::move(semaphore),
28 explicit GrSignalSemaphoreOp(sk_sp<GrSemaphore> semaphore, GrRenderTargetProxy* proxy,
30 : INHERITED(ClassID(), std::move(semaphore), proxy), fForceFlush(forceFlush) {}
45 static std::unique_ptr<GrWaitSemaphoreOp> Make(sk_sp<GrSemaphore> semaphore,
47 return std::unique_ptr<GrWaitSemaphoreOp>(new GrWaitSemaphoreOp(std::move(semaphore),
54 explicit GrWaitSemaphoreOp(sk_sp<GrSemaphore> semaphore, GrRenderTargetProxy* proxy)
55 : INHERITED(ClassID(), std::move(semaphore), proxy) {}
66 std::unique_ptr<GrSemaphoreOp> GrSemaphoreOp::MakeSignal(sk_sp<GrSemaphore> semaphore,
69 return GrSignalSemaphoreOp::Make(std::move(semaphore), proxy, forceFlush)
    [all...]
  /external/ltp/testcases/open_posix_testsuite/functional/semaphores/
assertions.xml 3 Using semaphore to protect critical section
6 Using semaphore to implement producer and consumer mechanism
9 Using semaphore to implement reader and writer problem
12 Using semaphore to implement philosopher problem
15 Using semaphore to implement sleeping Barber problem
coverage.txt 1 This file defines the coverage for Semaphore functional tests.
  /external/v8/src/base/platform/
semaphore.h 15 #include <mach/semaphore.h> // NOLINT
17 #include <semaphore.h> // NOLINT
27 // Semaphore
29 // A semaphore object is a synchronization object that maintains a count. The
30 // count is decremented each time a thread completes a wait for the semaphore
31 // object and incremented each time a thread signals the semaphore. When the
32 // count reaches zero, threads waiting for the semaphore blocks until the
35 class V8_BASE_EXPORT Semaphore final {
37 explicit Semaphore(int count);
38 ~Semaphore();
    [all...]
semaphore.cc 5 #include "src/base/platform/semaphore.h"
23 Semaphore::Semaphore(int count) {
31 Semaphore::~Semaphore() {
37 void Semaphore::Signal() {
44 void Semaphore::Wait() {
47 if (result == KERN_SUCCESS) return; // Semaphore was signalled.
53 bool Semaphore::WaitFor(const TimeDelta& rel_time) {
59 // Return immediately if semaphore was not signalled
    [all...]
  /cts/suite/audio_quality/lib/include/
Semaphore.h 21 #include <semaphore.h>
26 * Simple semaphore interface for synchronization between client and server
28 class Semaphore {
30 explicit Semaphore(int count = 0);
32 ~Semaphore();
34 /// down semaphore if it is already positive.
  /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_close/
3-2.c 19 * If sem_unlink has not been called after sem_open for this semaphore,
20 * the function has no effect on the semaphore.
23 * -> open a semaphore with a value of 2.
24 * -> wait the semaphore (now value = 1)
25 * -> close the semaphore.
26 * -> open the semaphore again (with dummy value = 3)
28 * -> close the semaphore.
29 * -> unlink the semaphore.
31 * The test fails if the semaphore value is not 1 after semaphore is reopened
    [all...]
  /external/valgrind/drd/
drd_semaphore.c 85 /** Enable or disable tracing of semaphore actions. */
93 * client semaphore at client address 'semaphore'.
97 const Addr semaphore)
99 tl_assert(semaphore != 0);
100 tl_assert(p->a1 == semaphore);
127 "Destruction of semaphore that is being waited"
138 * client semaphore. Allocate a new structure if such a structure did not
143 drd_semaphore_get_or_allocate(const Addr semaphore)
147 tl_assert(offsetof(DrdClientobj, semaphore) == 0)
    [all...]
drd_semaphore.h 25 // Semaphore state information: owner thread and recursion count.
40 struct semaphore_info* DRD_(semaphore_init)(const Addr semaphore,
43 void DRD_(semaphore_destroy)(const Addr semaphore);
44 struct semaphore_info* DRD_(semaphore_open)(const Addr semaphore,
47 void DRD_(semaphore_close)(const Addr semaphore);
48 void DRD_(semaphore_pre_wait)(const Addr semaphore);
49 void DRD_(semaphore_post_wait)(const DrdThreadId tid, const Addr semaphore,
51 void DRD_(semaphore_pre_post)(const DrdThreadId tid, const Addr semaphore);
52 void DRD_(semaphore_post_post)(const DrdThreadId tid, const Addr semaphore,
  /external/syslinux/core/include/
mbox.h 19 struct semaphore prod_sem; /* Producer semaphore (empty slots) */
20 struct semaphore cons_sem; /* Consumer semaphore (data slots) */
21 struct semaphore head_sem; /* Head pointer semaphore */
22 struct semaphore tail_sem; /* Tail pointer semaphore */
thread.h 17 struct semaphore;
36 struct semaphore *semaphore; member in struct:thread_block
68 struct semaphore { struct
74 struct semaphore sem = { \
82 mstime_t sem_down(struct semaphore *, mstime_t);
83 void sem_up(struct semaphore *);
84 void sem_init(struct semaphore *, int);
87 * This marks a semaphore object as unusable; it will remain unusable
89 * list of blocked processes on this semaphore!
    [all...]
  /cts/suite/audio_quality/lib/src/
Semaphore.cpp 17 #include "Semaphore.h"
20 Semaphore::Semaphore(int count)
27 Semaphore::~Semaphore()
32 void Semaphore::tryWait()
37 bool Semaphore::wait()
46 bool Semaphore::timedWait(int timeInMSec)
67 //LOGV("Semaphore::timedWait now %d-%d until %d-%d for %d msecs",
76 void Semaphore::post(
    [all...]
  /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/
assertions.xml 3 sem_unlink shall remove the created named semaphore and return zero on
7 Destruction of the semaphore is postponed until all process which were using the semaphore have called sem_close, _exit or exec.
11 insufficient priviledge to unlink the semaphore.
14 ERROR: ENOENT: Trying to unlink a named semaphore which doesn't exist.
17 ERROR: ENAMETOOLONG: The semaphore name length is greater than PATH_MAX or
21 Calls to sem_open to recreate/reconnect the semaphore actually refer to a new
22 semaphore after sem_unlink has been called.
31 When the semaphore is referenced by other processes, the function has no
32 effect on the state of the semaphore
    [all...]
  /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/
assertions.xml 3 sem_wait will lock the unlocked semaphore and decrement the semaphore
7 sem_wait: This test case verifies that the semaphore shall remain
11 sem_wait hangs when it tries to lock a locked semaphore, and then killed
15 errno return EAGAIN: The semaphore can't be immediately locked by
19 errno return EINVAL: the semaphore argument doesn't not refer to a valid
20 semaphore
23 errno return EINTR: a signal interrupted the waiting semaphore.
33 sem_trywait shall try to lock the unlocked semaphore and decrement
34 the semaphore value by one
    [all...]
1-1.c 10 * sem_wait shall lock the unlocked semaphore and decrement the semaphore
17 #include <semaphore.h>
34 /* Initial value of Semaphore is 1 */
41 /* Lock Semaphore */
47 /* Value of Semaphore */
52 /* Checking if the value of the Semaphore decremented by one */
11-1.c 10 * sem_trywait shall try to lock the unlocked semaphore and decrement
11 * the semaphore value by one.
17 #include <semaphore.h>
34 /* Initial value of Semaphore is 1 */
41 /* Lock Semaphore by sem_trywait */
47 /* Value of Semaphore */
52 /* Checking if the value of the Semaphore decremented by one */
  /external/skia/src/gpu/vk/
GrVkSemaphore.cpp 27 VkSemaphore semaphore = VK_NULL_HANDLE; local
29 CreateSemaphore(gpu->device(), &createInfo, nullptr, &semaphore));
31 return sk_sp<GrVkSemaphore>(new GrVkSemaphore(gpu, semaphore, false, false, isOwned));
35 VkSemaphore semaphore,
38 if (VK_NULL_HANDLE == semaphore) {
43 return sk_sp<GrVkSemaphore>(new GrVkSemaphore(gpu, semaphore, prohibitSignal, prohibitWait,
47 GrVkSemaphore::GrVkSemaphore(const GrVkGpu* gpu, VkSemaphore semaphore, bool prohibitSignal,
50 fResource = new Resource(semaphore, prohibitSignal, prohibitWait, isOwned);
69 backendSemaphore->initVulkan(fResource->semaphore());
  /external/skqp/src/gpu/vk/
GrVkSemaphore.cpp 27 VkSemaphore semaphore = VK_NULL_HANDLE; local
29 CreateSemaphore(gpu->device(), &createInfo, nullptr, &semaphore));
31 return sk_sp<GrVkSemaphore>(new GrVkSemaphore(gpu, semaphore, false, false, isOwned));
35 VkSemaphore semaphore,
38 if (VK_NULL_HANDLE == semaphore) {
43 return sk_sp<GrVkSemaphore>(new GrVkSemaphore(gpu, semaphore, prohibitSignal, prohibitWait,
47 GrVkSemaphore::GrVkSemaphore(const GrVkGpu* gpu, VkSemaphore semaphore, bool prohibitSignal,
50 fResource = new Resource(semaphore, prohibitSignal, prohibitWait, isOwned);
69 backendSemaphore->initVulkan(fResource->semaphore());

Completed in 502 milliseconds

1 2 3 4 5 6 7 8 91011>>