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

1 2 3 4 5 6

  /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/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...]
alarm_test.cc 28 #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...]
  /packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/task/
StartManagedProfileTask.java 36 import java.util.concurrent.Semaphore;
110 private final Semaphore semaphore = new Semaphore(0); field in class:StartManagedProfileTask.UserUnlockedReceiver
125 semaphore.release();
132 return semaphore.tryAcquire(USER_UNLOCKED_TIMEOUT_SECONDS, TimeUnit.SECONDS);
  /packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/finalization/
DpcReceivedSuccessReceiverTest.java 41 import java.util.concurrent.Semaphore;
118 // prepare a semaphore to handle AsyncTask usage
119 final Semaphore semaphore = new Semaphore(0); local
121 semaphore.release(1);
128 assertTrue(semaphore.tryAcquire(SEND_BROADCAST_TIMEOUT_SECONDS, TimeUnit.SECONDS));
  /bionic/benchmarks/
semaphore_benchmark.cpp 18 #include <semaphore.h>
27 sem_t semaphore; local
28 sem_init(&semaphore, 1, 1);
32 sem_getvalue(&semaphore, &dummy);
38 sem_t semaphore; local
39 sem_init(&semaphore, 1, 1);
42 sem_wait(&semaphore);
43 sem_post(&semaphore);
74 sem_t* semaphore = reinterpret_cast<sem_t*>(arg); local
75 while ((BM_semaphore_sem_post_running > 0) && !sem_wait(semaphore)) {
118 sem_t semaphore; member in class:SemaphoreFixture
    [all...]
  /external/ImageMagick/MagickCore/
delegate.h 26 #include "MagickCore/semaphore.h"
45 *semaphore; member in struct:_DelegateInfo
linked-list.c 52 #include "MagickCore/semaphore.h"
81 *semaphore;
128 LockSemaphoreInfo(list_info->semaphore);
137 UnlockSemaphoreInfo(list_info->semaphore);
179 LockSemaphoreInfo(list_info->semaphore);
193 UnlockSemaphoreInfo(list_info->semaphore);
233 LockSemaphoreInfo(list_info->semaphore);
243 UnlockSemaphoreInfo(list_info->semaphore);
244 RelinquishSemaphoreInfo(&list_info->semaphore);
281 LockSemaphoreInfo(list_info->semaphore);
79 *semaphore; member in struct:_LinkedListInfo
    [all...]
magick.h 26 #include "MagickCore/semaphore.h"
87 *semaphore; member in struct:_MagickInfo
  /external/deqp/framework/delibs/dethread/unix/
deNamedSemaphoreUnix.c 21 * \brief Unix implementation of semaphore using named semaphores.
31 #include <semaphore.h>
36 sem_t* semaphore; member in struct:NamedSemaphore_s
59 sem->semaphore = sem_open(name, O_CREAT|O_EXCL, mode, initialValue);
61 if (sem->semaphore == SEM_FAILED)
70 void deSemaphore_destroy (deSemaphore semaphore)
72 NamedSemaphore* sem = (NamedSemaphore*)semaphore;
78 res = sem_close(sem->semaphore);
86 void deSemaphore_increment (deSemaphore semaphore)
88 sem_t* sem = ((NamedSemaphore*)semaphore)->semaphore
    [all...]
  /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());
GrVkSemaphore.h 28 VkSemaphore semaphore,
36 Resource(VkSemaphore semaphore, bool prohibitSignal, bool prohibitWait, bool isOwned)
38 , fSemaphore(semaphore)
45 VkSemaphore semaphore() const { return fSemaphore; } function in class:GrVkSemaphore::Resource
86 GrVkSemaphore(const GrVkGpu* gpu, VkSemaphore semaphore, bool prohibitSignal, bool prohibitWait,
  /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());
GrVkSemaphore.h 28 VkSemaphore semaphore,
36 Resource(VkSemaphore semaphore, bool prohibitSignal, bool prohibitWait, bool isOwned)
38 , fSemaphore(semaphore)
45 VkSemaphore semaphore() const { return fSemaphore; } function in class:GrVkSemaphore::Resource
86 GrVkSemaphore(const GrVkGpu* gpu, VkSemaphore semaphore, bool prohibitSignal, bool prohibitWait,
  /system/bt/osi/src/
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/jmdns/src/javax/jmdns/impl/
DNSStatefulObject.java 7 import java.util.concurrent.Semaphore;
25 * This class define a semaphore. On this multiple threads can wait the arrival of one event. Thread wait for a maximum defined by the timeout.
27 * Implementation note: this class is based on {@link java.util.concurrent.Semaphore} so that they can be released by the timeout timer.
37 private final ConcurrentMap<Thread, Semaphore> _semaphores;
41 * Semaphore name for debugging purposes.
46 _semaphores = new ConcurrentHashMap<Thread, Semaphore>(50);
57 Semaphore semaphore = _semaphores.get(thread); local
58 if (semaphore == null) {
59 semaphore = new Semaphore(1, true)
    [all...]
  /external/skqp/src/gpu/
GrBackendTextureImageGenerator.cpp 36 sk_sp<GrSemaphore> semaphore,
55 info, texture.get(), origin, context->uniqueID(), std::move(semaphore), backendTexture));
62 sk_sp<GrSemaphore> semaphore,
66 , fSemaphore(std::move(semaphore))
133 sk_sp<GrSemaphore> semaphore = fSemaphore; local
138 [refHelper, releaseProcHelper, semaphore, backendTexture]
144 if (semaphore) {
145 resourceProvider->priv().gpu()->waitSemaphore(semaphore);
  /frameworks/opt/net/lowpan/command/java/com/android/commands/lowpan/
LowpanCtl.java 38 import java.util.concurrent.Semaphore;
409 Semaphore semaphore = new Semaphore(1); local
420 semaphore.release();
424 semaphore.acquire();
428 if (semaphore.tryAcquire(1, 60L, TimeUnit.SECONDS)) {
429 semaphore.release();
447 Semaphore semaphore = new Semaphore(1) local
    [all...]
  /external/python/cpython2/Demo/threads/
sync.py 7 # semaphore(n=1) # a semaphore object, with initial count n
197 # A semaphore object is created via
199 # your_semaphore = this_module.semaphore(count=1)
201 # A semaphore has an integer count associated with it. The initial value
203 # 1) passed to the semaphore constructor.
208 # If the semaphore's count is greater than 0, decrements the count
210 # Else if the semaphore's count is 0, blocks the calling thread
215 # Increments the semaphore's count by 1, and wakes up a thread (if
217 # increase the semaphore's count to a value larger than the initia
402 class semaphore: class in inherits:
    [all...]
  /external/skia/src/gpu/
GrBackendTextureImageGenerator.cpp 36 sk_sp<GrSemaphore> semaphore,
55 info, texture.get(), origin, context->uniqueID(), std::move(semaphore), backendTexture));
62 sk_sp<GrSemaphore> semaphore,
66 , fSemaphore(std::move(semaphore))
133 sk_sp<GrSemaphore> semaphore = fSemaphore; local
138 [refHelper, releaseProcHelper, semaphore, backendTexture]
144 if (semaphore) {
145 resourceProvider->priv().gpu()->waitSemaphore(semaphore);
GrGpu.cpp 475 sk_sp<GrSemaphore> semaphore; local
477 semaphore = resourceProvider->wrapBackendSemaphore(
481 semaphore = resourceProvider->makeSemaphore(false);
483 this->insertSemaphore(semaphore, false);
486 semaphore->setBackendSemaphore(&backendSemaphores[i]);
  /system/bt/btif/src/
stack_manager.cc 32 #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 = (semaphore_t*)context local
215 semaphore_t* semaphore = (semaphore_t*)context; local
    [all...]
  /external/deqp/external/vulkancts/modules/vulkan/synchronization/
vktSynchronizationBasicSemaphoreTests.cpp 21 * \brief Synchronization semaphore basic tests
52 const Unique<VkSemaphore> semaphore (createSemaphore (vk, device));
74 &semaphore.get(), // const VkSemaphore* pSignalSemaphores;
80 &semaphore.get(), // const VkSemaphore* pWaitSemaphores;
95 return tcu::TestStatus::fail("Basic semaphore tests with one queue failed");
97 return tcu::TestStatus::pass("Basic semaphore tests with one queue passed");
133 Move<VkSemaphore> semaphore; local
198 semaphore = (createSemaphore (vk, *logicalDevice));
212 submitInfo[FIRST].pSignalSemaphores = &semaphore.get();
217 submitInfo[SECOND].pWaitSemaphores = &semaphore.get()
    [all...]
  /external/eigen/unsupported/Eigen/CXX11/src/Tensor/
TensorDeviceCuda.h 33 // Return a semaphore. The semaphore is initially initialized to 0, and
35 // to maintain the invariant that the semaphore is always equal to 0 upon
37 virtual unsigned int* semaphore() const = 0;
165 virtual unsigned int* semaphore() const {
209 EIGEN_STRONG_INLINE unsigned int* semaphore() const { function
210 return stream_->semaphore();
  /external/syslinux/core/include/
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...]

Completed in 406 milliseconds

1 2 3 4 5 6