/ohos5.0/docs/en/device-dev/kernel/ |
H A D | kernel-mini-basic-ipc-sem.md | 10 - **0**: The semaphore is unavailable. In this case, tasks waiting for the semaphore may exist. 12 - Positive number: The semaphore is available. 45 Creating a semaphore: Obtain a semaphore from the linked list for unused semaphores and set its ini… 56 .| 117 | osSemaphoreNew | Creates and initializes a semaphore.| 118 | osSemaphoreRelease | Releases semaphore tokens till the initial maximum count.| 381 | \#include <semaphore.h> | int sem_timedwait(sem_t \*sem, const struct timespec \*abs_timeou… 382 | \#include <semaphore.h> | int sem_destroy(sem_t \*sem); | Destroys the specified unnamed se… 383 …\#include <semaphore.h> | int sem_init(sem_t \*sem, int pshared, unsigned int value); | Crea… 384 | \#include <semaphore.h> | int sem_post(sem_t \*sem); | Increments the semaphore count by 1.| [all …]
|
/ohos5.0/foundation/graphic/graphic_3d/lume/LumeRender/src/vulkan/ |
H A D | gpu_semaphore_vk.cpp | 41 &plat_.semaphore)); // pSemaphore in RENDER_BEGIN_NAMESPACE() 49 plat_.semaphore = VulkanHandleCast<VkSemaphore>(handle); in GpuSemaphoreVk() 55 if (ownsResources_ && plat_.semaphore) { in ~GpuSemaphoreVk() 59 plat_.semaphore, // semaphore in ~GpuSemaphoreVk() 62 plat_.semaphore = VK_NULL_HANDLE; in ~GpuSemaphoreVk() 67 return VulkanHandleCast<uint64_t>(plat_.semaphore); in GetHandle()
|
H A D | gpu_semaphore_vk.h | 30 VkSemaphore semaphore { VK_NULL_HANDLE };
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/render_service_base/src/platform/ohos/backend/ |
H A D | rs_surface_ohos_vulkan.cpp | 125 semaphore = VK_NULL_HANDLE; in CreateVkSemaphore() 133 importSemaphoreFdInfo.semaphore = semaphore; in CreateVkSemaphore() 140 vkInterface.vkDestroySemaphore(vkInterface.GetDevice(), semaphore, nullptr); in CreateVkSemaphore() 141 semaphore = VK_NULL_HANDLE; in CreateVkSemaphore() 215 VkSemaphore semaphore = VK_NULL_HANDLE; in RequestFrame() local 216 CreateVkSemaphore(semaphore, vkContext, nativeSurface); in RequestFrame() 217 if (semaphore != VK_NULL_HANDLE) { in RequestFrame() 218 nativeSurface.drawingSurface->Wait(1, semaphore); in RequestFrame() 254 VkSemaphore semaphore = vkContext.RequireSemaphore(); in FlushFrame() local 257 backendSemaphore.initVulkan(semaphore); in FlushFrame() [all …]
|
H A D | rs_vulkan_context.cpp | 95 vkDestroySemaphore(device_, semaphoreFence.semaphore, nullptr); in ~RsVulkanInterface() 475 vkDestroySemaphore(device_, semaphoreFence.semaphore, nullptr); in DestroyAllSemaphoreFence() 491 vkDestroySemaphore(device_, semaphoreFence.semaphore, nullptr); in RequireSemaphore() 498 vkDestroySemaphore(device_, it->semaphore, nullptr); in RequireSemaphore() 499 it->semaphore = VK_NULL_HANDLE; in RequireSemaphore() 511 VkSemaphore semaphore; in RequireSemaphore() local 512 auto err = vkCreateSemaphore(device_, &semaphoreInfo, nullptr, &semaphore); in RequireSemaphore() 516 return semaphore; in RequireSemaphore() 519 void RsVulkanInterface::SendSemaphoreWithFd(VkSemaphore semaphore, int fenceFd) in SendSemaphoreWithFd() argument 523 semaphoreFence.semaphore = semaphore; in SendSemaphoreWithFd()
|
H A D | rs_surface_ohos_vulkan.h | 42 VkSemaphore semaphore) in DestroySemaphoreInfo() 43 : mDestroyFunction(destroyFunction), mDevice(device), mSemaphore(semaphore) {} in DestroySemaphoreInfo() 105 void CreateVkSemaphore(VkSemaphore& semaphore,
|
H A D | rs_vulkan_context.h | 48 CallbackSemaphoreInfo(RsVulkanInterface& vkContext, VkSemaphore semaphore, int fenceFd) in CallbackSemaphoreInfo() 50 mSemaphore(semaphore), in CallbackSemaphoreInfo() 216 void SendSemaphoreWithFd(VkSemaphore semaphore, int fenceFd); 261 VkSemaphore semaphore; member
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/samples/2d_graphics/drawing_engine/drawing_surface/ |
H A D | surface_ohos_vulkan.cpp | 132 …VkSemaphore* semaphore, RsVulkanContext& vkContext, NativeBufferUtils::NativeSurfaceInfo& nativeSu… in CreateVkSemaphore() argument 139 rsInterface.vkCreateSemaphore(rsInterface.GetDevice(), &semaphoreInfo, nullptr, semaphore); in CreateVkSemaphore() 144 importSemaphoreFdInfo.semaphore = *semaphore; in CreateVkSemaphore() 217 VkSemaphore semaphore; in NativeRequestFrame() local 218 CreateVkSemaphore(&semaphore, vkContext, nativeSurface); in NativeRequestFrame() 219 nativeSurface.drawingSurface->Wait(1, semaphore); in NativeRequestFrame() 279 VkSemaphore semaphore; in NativeFlushFrame() local 280 vkContext.vkCreateSemaphore(vkContext.GetDevice(), &semaphoreInfo, nullptr, &semaphore); in NativeFlushFrame() 283 backendSemaphore.initVulkan(semaphore); in NativeFlushFrame() 304 queue, 1, &semaphore, surface.image, &fenceFd); in NativeFlushFrame() [all …]
|
/ohos5.0/foundation/communication/bluetooth_service/services/bluetooth/stack/platform/linux/ |
H A D | semaphore_linux.c | 49 Semaphore *semaphore = (Semaphore *)malloc(sizeof(Semaphore)); in SemaphoreCreate() local 50 if (semaphore == NULL) { in SemaphoreCreate() 56 (void)memset_s(semaphore, sizeof(Semaphore), 0, sizeof(Semaphore)); in SemaphoreCreate() 57 semaphore->fd = efd; in SemaphoreCreate() 58 semaphore->mutex = mutex; in SemaphoreCreate() 60 return semaphore; in SemaphoreCreate()
|
/ohos5.0/drivers/hdf_core/adapter/khdf/linux/osal/src/ |
H A D | osal_sem.c | 30 struct semaphore *sem_tmp = NULL; in OsalSemInit() 37 sem_tmp = (struct semaphore *)OsalMemCalloc(sizeof(*sem_tmp)); in OsalSemInit() 60 ret = down_interruptible((struct semaphore *)sem->realSemaphore); in OsalSemWait() 63 ret = down_timeout((struct semaphore *)sem->realSemaphore, msecs_to_jiffies(millisec)); in OsalSemWait() 85 up((struct semaphore *)sem->realSemaphore); in OsalSemPost()
|
/ohos5.0/foundation/communication/bluetooth_service/services/bluetooth/stack/src/btm/ |
H A D | btm_thread.c | 85 Semaphore *semaphore; member 101 if (context->semaphore != NULL) { in RunAllTaskInQueueTask() 102 SemaphorePost(context->semaphore); in RunAllTaskInQueueTask() 110 .semaphore = NULL, in RunAllTaskInQueue() 116 context.semaphore = SemaphoreCreate(0); in RunAllTaskInQueue() 118 SemaphoreWait(context.semaphore); in RunAllTaskInQueue() 119 SemaphoreDelete(context.semaphore); in RunAllTaskInQueue()
|
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/sync/ |
H A D | semaphore_inner.rs | 38 semaphore: &'a SemaphoreInner, field 221 fn new(semaphore: &'a SemaphoreInner) -> Permit { in new() 223 semaphore, in new() 234 let (semaphore, waker_index, enqueue) = unsafe { in poll() 236 (me.semaphore, &mut me.waker_index, &mut me.enqueue) in poll() 239 semaphore.poll_acquire(cx, waker_index, enqueue) in poll() 247 let _ = self.semaphore.waker_list.remove(self.waker_index.unwrap()); in drop()
|
H A D | mod.rs | 22 pub mod semaphore; module 30 pub use semaphore::{AutoRelSemaphore, AutoRelSemaphorePermit, Semaphore, SemaphorePermit};
|
/ohos5.0/drivers/hdf_core/framework/utils/src/ |
H A D | osal_msg_queue.c | 17 OsalSemInit(&queue->semaphore, 0); in OsalMessageQueueInit() 26 OsalSemDestroy(&queue->semaphore); in OsalMessageQueueDestroy() 54 OsalSemPost(&queue->semaphore); in HdfMessageQueueEnqueue() 75 OsalSemWait(&queue->semaphore, OSAL_WAIT_FOREVER); in HdfMessageQueueNext()
|
/ohos5.0/foundation/ai/ai_engine/test/common/ |
H A D | BUILD.gn | 34 "//foundation/ai/ai_engine/services/common/platform/semaphore:semaphore", 44 "semaphore/semaphore_test.cpp",
|
/ohos5.0/foundation/ai/ai_engine/services/common/ |
H A D | CMakeLists.txt | 69 platform/semaphore/include/i_semaphore.h 70 platform/semaphore/include/simple_event_notifier.h 71 platform/semaphore/include/simple_event_notifier.inl 72 platform/semaphore/source/semaphore.cpp
|
/ohos5.0/drivers/hdf_core/adapter/khdf/linux/platform/mipi_dsi/ |
H A D | mipi_tx_dev.c | 59 struct semaphore sem; 206 static int32_t SemaInit(struct semaphore *sem, uint16_t val) in SemaInit() 216 static void SemaDestroy(struct semaphore *sem) in SemaDestroy() 222 static int32_t SemaDownInterruptable(struct semaphore *sem) in SemaDownInterruptable() 227 static void SemaUp(struct semaphore *sem) in SemaUp() 277 static struct semaphore *GetSemaFromFilep(struct file *filep) in GetSemaFromFilep() 499 struct semaphore *sem = NULL; in MipiDsiDevIoctl()
|
/ohos5.0/foundation/ai/ai_engine/services/common/platform/semaphore/ |
H A D | BUILD.gn | 13 source_set("semaphore") { 14 sources = [ "source/semaphore.cpp" ]
|
/ohos5.0/foundation/ai/ai_engine/services/server/ |
H A D | BUILD.gn | 38 "//foundation/ai/ai_engine/services/common/platform/semaphore:semaphore",
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/test/2d_graphics/unittest/skia_adapter/ |
H A D | skia_surface_test.cpp | 130 VkSemaphore semaphore; variable 131 surface->Wait(5, semaphore); // 5: time 136 surface->Wait(1000, semaphore);
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing/draw/ |
H A D | surface.cpp | 157 void Surface::Wait(int32_t time, const VkSemaphore& semaphore) in Wait() argument 165 impl_->Wait(time, semaphore); in Wait()
|
/ohos5.0/drivers/hdf_core/framework/utils/include/ |
H A D | osal_msg_queue.h | 23 struct OsalSem semaphore; member
|