Home
last modified time | relevance | path

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

12345678910>>...16

/external/kotlinx.coroutines/kotlinx-coroutines-core/common/test/sync/
DSemaphoreTest.kt13 val semaphore = Semaphore(2) in <lambda>() constant
16 semaphore.release() in <lambda>()
20 semaphore.acquire() in <lambda>()
21 semaphore.acquire() in <lambda>()
23 semaphore.acquire() in <lambda>()
29 val semaphore = Semaphore(1) in <lambda>() constant
33 semaphore.acquire() // suspends in <lambda>()
35 semaphore.release() in <lambda>()
39 semaphore.acquire() // locked in <lambda>()
43 semaphore.release() in <lambda>()
[all …]
/external/pigweed/pw_sync/
Dcounting_semaphore_facade_test.cc32 pw_sync_CountingSemaphore* semaphore);
34 pw_sync_CountingSemaphore* semaphore, ptrdiff_t update);
36 pw_sync_CountingSemaphore* semaphore);
38 pw_sync_CountingSemaphore* semaphore);
40 pw_sync_CountingSemaphore* semaphore,
43 pw_sync_CountingSemaphore* semaphore,
58 CountingSemaphore semaphore; in TEST() local
59 EXPECT_FALSE(semaphore.try_acquire()); in TEST()
65 CountingSemaphore semaphore; in TEST() local
66 semaphore.release(); in TEST()
[all …]
Dbinary_semaphore_facade_test.cc31 void pw_sync_BinarySemaphore_CallRelease(pw_sync_BinarySemaphore* semaphore);
32 void pw_sync_BinarySemaphore_CallAcquire(pw_sync_BinarySemaphore* semaphore);
33 bool pw_sync_BinarySemaphore_CallTryAcquire(pw_sync_BinarySemaphore* semaphore);
35 pw_sync_BinarySemaphore* semaphore,
38 pw_sync_BinarySemaphore* semaphore,
53 BinarySemaphore semaphore; in TEST() local
54 EXPECT_FALSE(semaphore.try_acquire()); in TEST()
60 BinarySemaphore semaphore; in TEST() local
61 semaphore.release(); in TEST()
62 semaphore.release(); in TEST()
[all …]
Dcounting_semaphore_facade_test_c.c23 pw_sync_CountingSemaphore* semaphore) { in pw_sync_CountingSemaphore_CallRelease() argument
24 pw_sync_CountingSemaphore_Release(semaphore); in pw_sync_CountingSemaphore_CallRelease()
28 pw_sync_CountingSemaphore* semaphore, ptrdiff_t update) { in pw_sync_CountingSemaphore_CallReleaseNum() argument
29 pw_sync_CountingSemaphore_ReleaseNum(semaphore, update); in pw_sync_CountingSemaphore_CallReleaseNum()
33 pw_sync_CountingSemaphore* semaphore) { in pw_sync_CountingSemaphore_CallAcquire() argument
34 pw_sync_CountingSemaphore_Acquire(semaphore); in pw_sync_CountingSemaphore_CallAcquire()
38 pw_sync_CountingSemaphore* semaphore) { in pw_sync_CountingSemaphore_CallTryAcquire() argument
39 return pw_sync_CountingSemaphore_TryAcquire(semaphore); in pw_sync_CountingSemaphore_CallTryAcquire()
43 pw_sync_CountingSemaphore* semaphore, in pw_sync_CountingSemaphore_CallTryAcquireFor() argument
45 return pw_sync_CountingSemaphore_TryAcquireFor(semaphore, for_at_least); in pw_sync_CountingSemaphore_CallTryAcquireFor()
[all …]
Dcounting_semaphore.cc20 pw_sync_CountingSemaphore* semaphore) { in pw_sync_CountingSemaphore_Release() argument
21 semaphore->release(); in pw_sync_CountingSemaphore_Release()
25 pw_sync_CountingSemaphore* semaphore, ptrdiff_t update) { in pw_sync_CountingSemaphore_ReleaseNum() argument
26 semaphore->release(update); in pw_sync_CountingSemaphore_ReleaseNum()
30 pw_sync_CountingSemaphore* semaphore) { in pw_sync_CountingSemaphore_Acquire() argument
31 semaphore->acquire(); in pw_sync_CountingSemaphore_Acquire()
35 pw_sync_CountingSemaphore* semaphore) { in pw_sync_CountingSemaphore_TryAcquire() argument
36 return semaphore->try_acquire(); in pw_sync_CountingSemaphore_TryAcquire()
40 pw_sync_CountingSemaphore* semaphore, in pw_sync_CountingSemaphore_TryAcquireFor() argument
42 return semaphore->try_acquire_for(SystemClock::duration(for_at_least.ticks)); in pw_sync_CountingSemaphore_TryAcquireFor()
[all …]
Dbinary_semaphore_facade_test_c.c22 void pw_sync_BinarySemaphore_CallRelease(pw_sync_BinarySemaphore* semaphore) { in pw_sync_BinarySemaphore_CallRelease() argument
23 pw_sync_BinarySemaphore_Release(semaphore); in pw_sync_BinarySemaphore_CallRelease()
26 void pw_sync_BinarySemaphore_CallAcquire(pw_sync_BinarySemaphore* semaphore) { in pw_sync_BinarySemaphore_CallAcquire() argument
27 pw_sync_BinarySemaphore_Acquire(semaphore); in pw_sync_BinarySemaphore_CallAcquire()
31 pw_sync_BinarySemaphore* semaphore) { in pw_sync_BinarySemaphore_CallTryAcquire() argument
32 return pw_sync_BinarySemaphore_TryAcquire(semaphore); in pw_sync_BinarySemaphore_CallTryAcquire()
36 pw_sync_BinarySemaphore* semaphore, in pw_sync_BinarySemaphore_CallTryAcquireFor() argument
38 return pw_sync_BinarySemaphore_TryAcquireFor(semaphore, for_at_least); in pw_sync_BinarySemaphore_CallTryAcquireFor()
42 pw_sync_BinarySemaphore* semaphore, in pw_sync_BinarySemaphore_CallTryAcquireUntil() argument
44 return pw_sync_BinarySemaphore_TryAcquireUntil(semaphore, until_at_least); in pw_sync_BinarySemaphore_CallTryAcquireUntil()
Dbinary_semaphore.cc20 pw_sync_BinarySemaphore* semaphore) { in pw_sync_BinarySemaphore_Release() argument
21 semaphore->release(); in pw_sync_BinarySemaphore_Release()
25 pw_sync_BinarySemaphore* semaphore) { in pw_sync_BinarySemaphore_Acquire() argument
26 semaphore->acquire(); in pw_sync_BinarySemaphore_Acquire()
30 pw_sync_BinarySemaphore* semaphore) { in pw_sync_BinarySemaphore_TryAcquire() argument
31 return semaphore->try_acquire(); in pw_sync_BinarySemaphore_TryAcquire()
35 pw_sync_BinarySemaphore* semaphore, in pw_sync_BinarySemaphore_TryAcquireFor() argument
37 return semaphore->try_acquire_for(SystemClock::duration(for_at_least.ticks)); in pw_sync_BinarySemaphore_TryAcquireFor()
41 pw_sync_BinarySemaphore* semaphore, in pw_sync_BinarySemaphore_TryAcquireUntil() argument
43 return semaphore->try_acquire_until(SystemClock::time_point( in pw_sync_BinarySemaphore_TryAcquireUntil()
/external/rust/crates/tokio/src/sync/tests/
Dloom_semaphore_batch.rs19 semaphore: Semaphore, in basic_usage() field
24 shared.semaphore.acquire(1).await.unwrap(); in basic_usage()
30 shared.semaphore.release(1); in basic_usage()
35 semaphore: Semaphore::new(NUM), in basic_usage()
54 let semaphore = Arc::new(Semaphore::new(1)); in release() localVariable
57 let semaphore = semaphore.clone(); in release() localVariable
59 block_on(semaphore.acquire(1)).unwrap(); in release()
60 semaphore.release(1); in release()
64 block_on(semaphore.acquire(1)).unwrap(); in release()
66 semaphore.release(1); in release()
[all …]
/external/tensorflow/tensorflow/compiler/xla/pjrt/
Dsemaphore_test.cc27 Semaphore semaphore(2); in TEST() local
28 semaphore.Acquire(1); in TEST()
29 semaphore.Release(1); in TEST()
31 semaphore.Acquire(2); in TEST()
32 semaphore.Release(2); in TEST()
34 semaphore.Acquire(1); in TEST()
35 semaphore.Acquire(1); in TEST()
36 semaphore.Release(1); in TEST()
37 semaphore.Acquire(1); in TEST()
38 semaphore.Release(1); in TEST()
[all …]
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/sync/
DSemaphoreStressTest.kt13 val semaphore = Semaphore(1) in <lambda>() constant
17 semaphore.acquire() in <lambda>()
19 semaphore.release() in <lambda>()
31 val semaphore = Semaphore(10) in <lambda>() constant
35 semaphore.acquire() in <lambda>()
36 semaphore.release() in <lambda>()
46 val semaphore = Semaphore(1) in <lambda>() constant
47 semaphore.acquire() in <lambda>()
50 semaphore.acquire() in <lambda>()
55 assertEquals(0, semaphore.availablePermits) in <lambda>()
[all …]
/external/deqp/framework/delibs/dethread/unix/
DdeNamedSemaphoreUnix.c36 sem_t* semaphore; member
59 sem->semaphore = sem_open(name, O_CREAT|O_EXCL, mode, initialValue); in deSemaphore_create()
61 if (sem->semaphore == SEM_FAILED) in deSemaphore_create()
70 void deSemaphore_destroy (deSemaphore semaphore) in deSemaphore_destroy() argument
72 NamedSemaphore* sem = (NamedSemaphore*)semaphore; in deSemaphore_destroy()
78 res = sem_close(sem->semaphore); in deSemaphore_destroy()
86 void deSemaphore_increment (deSemaphore semaphore) in deSemaphore_increment() argument
88 sem_t* sem = ((NamedSemaphore*)semaphore)->semaphore; in deSemaphore_increment()
94 void deSemaphore_decrement (deSemaphore semaphore) in deSemaphore_decrement() argument
96 sem_t* sem = ((NamedSemaphore*)semaphore)->semaphore; in deSemaphore_decrement()
[all …]
DdeSemaphoreUnix.c53 void deSemaphore_destroy (deSemaphore semaphore) in deSemaphore_destroy() argument
55 sem_t* sem = (sem_t*)semaphore; in deSemaphore_destroy()
61 void deSemaphore_increment (deSemaphore semaphore) in deSemaphore_increment() argument
63 sem_t* sem = (sem_t*)semaphore; in deSemaphore_increment()
69 void deSemaphore_decrement (deSemaphore semaphore) in deSemaphore_decrement() argument
71 sem_t* sem = (sem_t*)semaphore; in deSemaphore_decrement()
77 deBool deSemaphore_tryDecrement (deSemaphore semaphore) in deSemaphore_tryDecrement() argument
79 sem_t* sem = (sem_t*)semaphore; in deSemaphore_tryDecrement()
/external/swiftshader/src/Vulkan/
DVkSemaphoreExternalLinux.hpp186 semaphore->wait(); in wait()
191 return semaphore->tryWait(); in tryWait()
196 semaphore->signal(); in signal()
202 if(semaphore) in unmapRegion()
204 if(semaphore->deref()) in unmapRegion()
206 semaphore->~SharedSemaphore(); in unmapRegion()
208 memfd.unmap(semaphore, sw::memoryPageSize()); in unmapRegion()
210 semaphore = nullptr; in unmapRegion()
224 semaphore = reinterpret_cast<SharedSemaphore *>(addr); in mapRegion()
227 new(semaphore) SharedSemaphore(initialValue); in mapRegion()
[all …]
/external/guava/android/guava-tests/test/com/google/common/util/concurrent/
DUninterruptiblesTest.java365 Semaphore semaphore = new Semaphore(99); in testTryAcquireWithNoWait() local
366 assertTrue(tryAcquireUninterruptibly(semaphore, 0, MILLISECONDS)); in testTryAcquireWithNoWait()
367 assertTrue(tryAcquireUninterruptibly(semaphore, -42, MILLISECONDS)); in testTryAcquireWithNoWait()
368 assertTrue(tryAcquireUninterruptibly(semaphore, LONG_DELAY_MS, MILLISECONDS)); in testTryAcquireWithNoWait()
373 TimedSemaphore semaphore = TimedSemaphore.createWithDelay(20); in testTryAcquireTimeoutNoInterruptNotExpired() local
374 semaphore.tryAcquireSuccessfully(LONG_DELAY_MS); in testTryAcquireTimeoutNoInterruptNotExpired()
379 TimedSemaphore semaphore = TimedSemaphore.createWithDelay(LONG_DELAY_MS); in testTryAcquireTimeoutNoInterruptExpired() local
380 semaphore.tryAcquireUnsuccessfully(30); in testTryAcquireTimeoutNoInterruptExpired()
385 TimedSemaphore semaphore = TimedSemaphore.createWithDelay(50); in testTryAcquireTimeoutSingleInterruptNoExpire() local
387 semaphore.tryAcquireSuccessfully(LONG_DELAY_MS); in testTryAcquireTimeoutSingleInterruptNoExpire()
[all …]
/external/ImageMagick/MagickCore/
Dlinked-list.c80 *semaphore; member
126 LockSemaphoreInfo(list_info->semaphore); in AppendValueToLinkedList()
135 UnlockSemaphoreInfo(list_info->semaphore); in AppendValueToLinkedList()
176 LockSemaphoreInfo(list_info->semaphore); in ClearLinkedList()
190 UnlockSemaphoreInfo(list_info->semaphore); in ClearLinkedList()
230 LockSemaphoreInfo(list_info->semaphore); in DestroyLinkedList()
240 UnlockSemaphoreInfo(list_info->semaphore); in DestroyLinkedList()
241 RelinquishSemaphoreInfo(&list_info->semaphore); in DestroyLinkedList()
277 LockSemaphoreInfo(list_info->semaphore); in GetLastValueInLinkedList()
279 UnlockSemaphoreInfo(list_info->semaphore); in GetLastValueInLinkedList()
[all …]
Dsplay-tree.c109 *semaphore; member
163 LockSemaphoreInfo(splay_tree->semaphore); in AddValueToSplayTree()
185 UnlockSemaphoreInfo(splay_tree->semaphore); in AddValueToSplayTree()
192 UnlockSemaphoreInfo(splay_tree->semaphore); in AddValueToSplayTree()
218 UnlockSemaphoreInfo(splay_tree->semaphore); in AddValueToSplayTree()
362 LockSemaphoreInfo(splay_tree->semaphore); in CloneSplayTree()
365 UnlockSemaphoreInfo(splay_tree->semaphore); in CloneSplayTree()
383 UnlockSemaphoreInfo(splay_tree->semaphore); in CloneSplayTree()
497 LockSemaphoreInfo(splay_tree->semaphore); in DeleteNodeByValueFromSplayTree()
500 UnlockSemaphoreInfo(splay_tree->semaphore); in DeleteNodeByValueFromSplayTree()
[all …]
/external/guava/guava-tests/test/com/google/common/util/concurrent/
DUninterruptiblesTest.java366 Semaphore semaphore = new Semaphore(99); in testTryAcquireWithNoWait() local
367 assertTrue(tryAcquireUninterruptibly(semaphore, 0, MILLISECONDS)); in testTryAcquireWithNoWait()
368 assertTrue(tryAcquireUninterruptibly(semaphore, -42, MILLISECONDS)); in testTryAcquireWithNoWait()
369 assertTrue(tryAcquireUninterruptibly(semaphore, LONG_DELAY_MS, MILLISECONDS)); in testTryAcquireWithNoWait()
374 TimedSemaphore semaphore = TimedSemaphore.createWithDelay(20); in testTryAcquireTimeoutNoInterruptNotExpired() local
375 semaphore.tryAcquireSuccessfully(LONG_DELAY_MS); in testTryAcquireTimeoutNoInterruptNotExpired()
380 TimedSemaphore semaphore = TimedSemaphore.createWithDelay(LONG_DELAY_MS); in testTryAcquireTimeoutNoInterruptExpired() local
381 semaphore.tryAcquireUnsuccessfully(30); in testTryAcquireTimeoutNoInterruptExpired()
386 TimedSemaphore semaphore = TimedSemaphore.createWithDelay(50); in testTryAcquireTimeoutSingleInterruptNoExpire() local
388 semaphore.tryAcquireSuccessfully(LONG_DELAY_MS); in testTryAcquireTimeoutSingleInterruptNoExpire()
[all …]
/external/skia/src/gpu/vk/
DGrVkSemaphore.cpp25 VkSemaphore semaphore = VK_NULL_HANDLE; in Make() local
28 &semaphore)); in Make()
33 return std::unique_ptr<GrVkSemaphore>(new GrVkSemaphore(gpu, semaphore, false, false, isOwned)); in Make()
37 VkSemaphore semaphore, in MakeWrapped() argument
40 if (VK_NULL_HANDLE == semaphore) { in MakeWrapped()
46 return std::unique_ptr<GrVkSemaphore>(new GrVkSemaphore(gpu, semaphore, prohibitSignal, in MakeWrapped()
51 GrVkSemaphore::GrVkSemaphore(GrVkGpu* gpu, VkSemaphore semaphore, bool prohibitSignal, in GrVkSemaphore() argument
53 fResource = new Resource(gpu, semaphore, prohibitSignal, prohibitWait, isOwned); in GrVkSemaphore()
71 backendSemaphore.initVulkan(fResource->semaphore()); in backendSemaphore()
/external/deqp/framework/delibs/dethread/win32/
DdeSemaphoreWin32.c51 void deSemaphore_destroy (deSemaphore semaphore) in deSemaphore_destroy() argument
53 HANDLE handle = (HANDLE)semaphore; in deSemaphore_destroy()
57 void deSemaphore_increment (deSemaphore semaphore) in deSemaphore_increment() argument
59 HANDLE handle = (HANDLE)semaphore; in deSemaphore_increment()
65 void deSemaphore_decrement (deSemaphore semaphore) in deSemaphore_decrement() argument
67 HANDLE handle = (HANDLE)semaphore; in deSemaphore_decrement()
73 deBool deSemaphore_tryDecrement (deSemaphore semaphore) in deSemaphore_tryDecrement() argument
75 HANDLE handle = (HANDLE)semaphore; in deSemaphore_tryDecrement()
/external/skqp/src/gpu/vk/
DGrVkSemaphore.cpp25 VkSemaphore semaphore = VK_NULL_HANDLE; in Make() local
27 CreateSemaphore(gpu->device(), &createInfo, nullptr, &semaphore)); in Make()
29 return sk_sp<GrVkSemaphore>(new GrVkSemaphore(gpu, semaphore, false, false, isOwned)); in Make()
33 VkSemaphore semaphore, in MakeWrapped() argument
36 if (VK_NULL_HANDLE == semaphore) { in MakeWrapped()
41 return sk_sp<GrVkSemaphore>(new GrVkSemaphore(gpu, semaphore, prohibitSignal, prohibitWait, in MakeWrapped()
45 GrVkSemaphore::GrVkSemaphore(GrVkGpu* gpu, VkSemaphore semaphore, bool prohibitSignal, in GrVkSemaphore() argument
48 fResource = new Resource(semaphore, prohibitSignal, prohibitWait, isOwned); in GrVkSemaphore()
78 backendSemaphore.initVulkan(fResource->semaphore()); in backendSemaphore()
/external/rust/crates/tokio/src/sync/mpsc/
Dbounded.rs1 use crate::sync::batch_semaphore::{self as semaphore, TryAcquireError};
94 let semaphore = (semaphore::Semaphore::new(buffer), buffer); in channel() localVariable
95 let (tx, rx) = chan::channel(semaphore); in channel()
105 type Semaphore = (semaphore::Semaphore, usize);
451 match self.chan.semaphore().0.try_acquire(1) { in try_send()
627 match self.chan.semaphore().0.acquire(1).await { in reserve()
679 match self.chan.semaphore().0.try_acquire(1) { in try_reserve()
733 self.chan.semaphore().0.available_permits() in capacity()
802 let semaphore = self.chan.semaphore(); in drop() localVariable
805 semaphore.add_permit(); in drop()
[all …]
/external/dng_sdk/source/
Ddng_pthread.cpp62 HANDLE semaphore; member
184 HANDLE semaphore = ::TlsGetValue(thread_wait_sema_TLS_index); in GetThreadSemaphore() local
185 if (semaphore == NULL) in GetThreadSemaphore()
187 semaphore = ::CreateSemaphore(NULL, 0, 1, NULL); in GetThreadSemaphore()
188 ::TlsSetValue(thread_wait_sema_TLS_index, semaphore); in GetThreadSemaphore()
191 return semaphore; in GetThreadSemaphore()
198 HANDLE semaphore = (HANDLE)::TlsGetValue(thread_wait_sema_TLS_index); in FreeThreadSemaphore() local
200 if (semaphore != NULL) in FreeThreadSemaphore()
203 ::CloseHandle(semaphore); in FreeThreadSemaphore()
577 HANDLE semaphore = GetThreadSemaphore(); in cond_wait_internal() local
[all …]
/external/mesa3d/src/mesa/main/
Dexternalobjects.h61 _mesa_lookup_semaphore_object(struct gl_context *ctx, GLuint semaphore) in _mesa_lookup_semaphore_object() argument
63 if (!semaphore) in _mesa_lookup_semaphore_object()
67 _mesa_HashLookup(ctx->Shared->SemaphoreObjects, semaphore); in _mesa_lookup_semaphore_object()
71 _mesa_lookup_semaphore_object_locked(struct gl_context *ctx, GLuint semaphore) in _mesa_lookup_semaphore_object_locked() argument
73 if (!semaphore) in _mesa_lookup_semaphore_object_locked()
77 _mesa_HashLookupLocked(ctx->Shared->SemaphoreObjects, semaphore); in _mesa_lookup_semaphore_object_locked()
221 _mesa_IsSemaphoreEXT(GLuint semaphore);
224 _mesa_SemaphoreParameterui64vEXT(GLuint semaphore,
229 _mesa_GetSemaphoreParameterui64vEXT(GLuint semaphore,
234 _mesa_WaitSemaphoreEXT(GLuint semaphore,
[all …]
/external/skqp/src/gpu/ops/
DGrSemaphoreOp.cpp21 sk_sp<GrSemaphore> semaphore, in Make() argument
25 return pool->allocate<GrWaitSemaphoreOp>(std::move(semaphore), proxy); in Make()
33 explicit GrWaitSemaphoreOp(sk_sp<GrSemaphore> semaphore, GrRenderTargetProxy* proxy) in GrWaitSemaphoreOp() argument
34 : INHERITED(ClassID(), std::move(semaphore), proxy) {} in GrWaitSemaphoreOp()
46 sk_sp<GrSemaphore> semaphore, in MakeWait() argument
48 return GrWaitSemaphoreOp::Make(context, std::move(semaphore), proxy); in MakeWait()
/external/mesa3d/src/intel/vulkan/
Danv_queue.c82 static struct anv_semaphore *anv_semaphore_ref(struct anv_semaphore *semaphore);
83 static void anv_semaphore_unref(struct anv_device *device, struct anv_semaphore *semaphore);
297 struct anv_semaphore *semaphore = submit->sync_fd_semaphores[i]; in anv_queue_submit_timeline_locked() local
301 assert(semaphore->temporary.type == ANV_SEMAPHORE_TYPE_NONE); in anv_queue_submit_timeline_locked()
302 struct anv_semaphore_impl *impl = &semaphore->permanent; in anv_queue_submit_timeline_locked()
415 struct anv_semaphore *semaphore = submit->sync_fd_semaphores[i]; in anv_queue_task() local
419 assert(semaphore->temporary.type == ANV_SEMAPHORE_TYPE_NONE); in anv_queue_task()
420 struct anv_semaphore_impl *impl = &semaphore->permanent; in anv_queue_task()
647 struct anv_semaphore *semaphore) in anv_queue_submit_add_sync_fd_fence() argument
662 anv_semaphore_ref(semaphore); in anv_queue_submit_add_sync_fd_fence()
[all …]

12345678910>>...16