Home
last modified time | relevance | path

Searched refs:sem (Results 1 - 25 of 44) sorted by relevance

12

/drivers/hdf_core/adapter/khdf/linux/osal/src/
H A Dosal_sem.c28 int32_t OsalSemInit(struct OsalSem *sem, uint32_t value) in OsalSemInit() argument
32 if (sem == NULL) { in OsalSemInit()
43 sem->realSemaphore = (void *)sem_tmp; in OsalSemInit()
49 int32_t OsalSemWait(struct OsalSem *sem, uint32_t millisec) in OsalSemWait() argument
53 if (sem == NULL || sem->realSemaphore == NULL) { in OsalSemWait()
60 ret = down_interruptible((struct semaphore *)sem->realSemaphore); in OsalSemWait()
63 ret = down_timeout((struct semaphore *)sem->realSemaphore, msecs_to_jiffies(millisec)); in OsalSemWait()
78 int32_t OsalSemPost(struct OsalSem *sem) in OsalSemPost() argument
80 if (sem in OsalSemPost()
91 OsalSemDestroy(struct OsalSem *sem) OsalSemDestroy() argument
[all...]
/drivers/hdf_core/adapter/khdf/liteos/osal/src/
H A Dosal_sem.c40 int32_t OsalSemInit(struct OsalSem *sem, uint32_t value) in OsalSemInit() argument
45 if (sem == NULL) { in OsalSemInit()
52 sem->realSemaphore = (void *)(uintptr_t)semId; in OsalSemInit()
55 sem->realSemaphore = (void *)(uintptr_t)HDF_INVALID_SEM_ID; in OsalSemInit()
61 int32_t OsalSemWait(struct OsalSem *sem, uint32_t ms) in OsalSemWait() argument
65 if (sem == NULL || sem->realSemaphore == (void *)(uintptr_t)HDF_INVALID_SEM_ID) { in OsalSemWait()
70 ret = LOS_SemPend((uint32_t)(uintptr_t)sem->realSemaphore, LOS_MS2Tick(ms)); in OsalSemWait()
82 int32_t OsalSemPost(struct OsalSem *sem) in OsalSemPost() argument
86 if (sem in OsalSemPost()
100 OsalSemDestroy(struct OsalSem *sem) OsalSemDestroy() argument
[all...]
/drivers/hdf_core/adapter/khdf/liteos_m/osal/src/
H A Dosal_sem.c44 int32_t OsalSemInit(struct OsalSem *sem, uint32_t value) in OsalSemInit() argument
49 if (sem == NULL) { in OsalSemInit()
56 sem->realSemaphore = (void *)(uintptr_t)semId; in OsalSemInit()
59 sem->realSemaphore = (void *)(uintptr_t)HDF_INVALID_SEM_ID; in OsalSemInit()
65 int32_t OsalSemWait(struct OsalSem *sem, uint32_t ms) in OsalSemWait() argument
69 if (sem == NULL || sem->realSemaphore == (void *)(uintptr_t)HDF_INVALID_SEM_ID) { in OsalSemWait()
74 ret = LOS_SemPend((uint32_t)(uintptr_t)sem->realSemaphore, LOS_MS2Tick(ms)); in OsalSemWait()
86 int32_t OsalSemPost(struct OsalSem *sem) in OsalSemPost() argument
90 if (sem in OsalSemPost()
104 OsalSemDestroy(struct OsalSem *sem) OsalSemDestroy() argument
[all...]
/drivers/hdf_core/adapter/khdf/uniproton/osal/src/
H A Dosal_sem.c39 int32_t OsalSemInit(struct OsalSem *sem, uint32_t value) in OsalSemInit() argument
44 if (sem == NULL) { in OsalSemInit()
51 sem->realSemaphore = (void *)(uintptr_t)semId; in OsalSemInit()
54 sem->realSemaphore = (void *)(uintptr_t)HDF_INVALID_SEM_ID; in OsalSemInit()
60 int32_t OsalSemWait(struct OsalSem *sem, uint32_t ms) in OsalSemWait() argument
65 if (sem == NULL || sem->realSemaphore == (void *)(uintptr_t)HDF_INVALID_SEM_ID) { in OsalSemWait()
70 ret = PRT_SemPend((uint32_t)(uintptr_t)sem->realSemaphore, ticks); in OsalSemWait()
82 int32_t OsalSemPost(struct OsalSem *sem) in OsalSemPost() argument
86 if (sem in OsalSemPost()
100 OsalSemDestroy(struct OsalSem *sem) OsalSemDestroy() argument
[all...]
/drivers/hdf_core/framework/support/posix/src/
H A Dosal_sem.c21 int32_t OsalSemInit(struct OsalSem *sem, uint32_t value) in OsalSemInit() argument
25 if (sem == NULL) { in OsalSemInit()
30 sem->realSemaphore = NULL; in OsalSemInit()
43 sem->realSemaphore = (void *)semTmp; in OsalSemInit()
48 int32_t OsalSemWait(struct OsalSem *sem, uint32_t ms) in OsalSemWait() argument
50 if (sem == NULL || sem->realSemaphore == NULL) { in OsalSemWait()
56 if (sem_wait((sem_t *)sem->realSemaphore) != 0) { in OsalSemWait()
70 int32_t ret = sem_timedwait((sem_t *)sem->realSemaphore, &time); in OsalSemWait()
84 int32_t OsalSemPost(struct OsalSem *sem) in OsalSemPost() argument
99 OsalSemDestroy(struct OsalSem *sem) OsalSemDestroy() argument
[all...]
/drivers/hdf_core/interfaces/inner_api/osal/shared/
H A Dosal_sem.h52 #define OSAL_DECLARE_SEMAPHORE(sem) struct OsalSem sem
57 * @param sem Indicates the pointer to the semaphore {@link OsalSem}.
70 int32_t OsalSemInit(struct OsalSem *sem, uint32_t value);
75 * @param sem Indicates the pointer to the semaphore {@link OsalSem}.
89 int32_t OsalSemWait(struct OsalSem *sem, uint32_t ms);
94 * @param sem Indicates the pointer to the semaphore {@link OsalSem}.
106 int32_t OsalSemPost(struct OsalSem *sem);
111 * @param sem Indicates the pointer to the semaphore {@link OsalSem}.
123 int32_t OsalSemDestroy(struct OsalSem *sem);
[all...]
/drivers/hdf_core/framework/test/unittest/platform/common/
H A Dplatform_queue_test.c21 struct OsalSem sem; member
52 (void)OsalSemPost(&tmsg->sem); in PlatformQueueTestHandle()
67 (void)OsalSemInit(&tmsg.sem, 0); in PlatformQueueTestAddAndWait()
71 (void)OsalSemDestroy(&tmsg.sem); in PlatformQueueTestAddAndWait()
76 ret = OsalSemWait(&tmsg.sem, PLAT_QUEUE_TEST_TIMEOUT); in PlatformQueueTestAddAndWait()
78 (void)OsalSemDestroy(&tmsg.sem); in PlatformQueueTestAddAndWait()
82 (void)OsalSemDestroy(&tmsg.sem); in PlatformQueueTestAddAndWait()
86 (void)OsalSemDestroy(&tmsg.sem); in PlatformQueueTestAddAndWait()
/drivers/hdf_core/adapter/khdf/linux/platform/mipi_dsi/
H A Dmipi_tx_dev.c59 struct semaphore sem; member
206 static int32_t SemaInit(struct semaphore *sem, uint16_t val) in SemaInit() argument
208 if (sem == NULL) { in SemaInit()
209 HDF_LOGE("SemaInit: sem is null!"); in SemaInit()
212 sema_init(sem, val); in SemaInit()
216 static void SemaDestroy(struct semaphore *sem) in SemaDestroy() argument
218 // don't support sema_destory(sem)! in SemaDestroy()
219 (void)sem; in SemaDestroy()
222 static int32_t SemaDownInterruptable(struct semaphore *sem) in SemaDownInterruptable() argument
224 return down_interruptible(sem); in SemaDownInterruptable()
227 SemaUp(struct semaphore *sem) SemaUp() argument
499 struct semaphore *sem = NULL; MipiDsiDevIoctl() local
[all...]
/drivers/hdf_core/framework/support/platform/src/fwk/
H A Dplatform_queue.c24 (void)OsalSemDestroy(&queue->sem); in PlatformQueueDoDestroy()
56 ret = OsalSemWait(&queue->sem, HDF_WAIT_FOREVER); in PlatformQueueWorker()
87 (void)OsalSemInit(&queue->sem, 0); in PlatformQueueCreate()
140 (void)OsalSemPost(&queue->sem); in PlatformQueueDestroy()
169 (void)OsalSemPost(&queue->sem); in PlatformQueueAddMsg()
188 (void)OsalSemWait(&queue->sem, HDF_WAIT_FOREVER); // consume the semaphore after get in PlatformQueueGetMsg()
197 ret = OsalSemWait(&queue->sem, tms); in PlatformQueueGetMsg()
199 PLAT_LOGE("PlatformQueueGetMsg: sem wait fail!"); in PlatformQueueGetMsg()
H A Dplatform_event.c24 struct OsalSem sem; member
40 (void)OsalSemInit(&pe->sem, 0); in PlatformEventInit()
75 (void)OsalSemDestroy(&pe->sem); in PlatformEventUninit()
124 ret = OsalSemPost(&waiter->sem); in PlatformEventPost()
166 (void)OsalSemInit(&waiter.sem, 0); in PlatformEventReadSlowlly()
173 ret = OsalSemWait(&waiter.sem, tms); in PlatformEventReadSlowlly()
175 (void)OsalSemDestroy(&waiter.sem); in PlatformEventReadSlowlly()
186 (void)OsalSemDestroy(&waiter.sem); in PlatformEventReadSlowlly()
/drivers/hdf_core/framework/utils/src/
H A Dhdf_task_queue.c50 ret = OsalSemInit(&queue->sem, 0); in HdfTaskQueueCreate()
62 (void)OsalSemDestroy(&queue->sem); in HdfTaskQueueCreate()
88 ret = OsalSemPost(&queue->sem); in HdfQueueStopThread()
146 ret = OsalSemPost(&queue->sem); in HdfTaskEnqueue()
171 ret = OsalSemWait(&queue->sem, HDF_WAIT_FOREVER); in HdfThreadTasker()
198 (void)OsalSemDestroy(&queue->sem); in HdfThreadTasker()
/drivers/hdf_core/framework/support/platform/src/can/
H A Dcan_manager.c56 ret = OsalSemWait(&cntlr->sem, HDF_WAIT_FOREVER); in CanIrqThreadWorker()
84 ret = OsalSemInit(&cntlr->sem, 0); in CanCntlrCreateThread()
86 HDF_LOGE("CanCntlrCreateThread: sem init fail!"); in CanCntlrCreateThread()
93 (void)OsalSemDestroy(&cntlr->sem); in CanCntlrCreateThread()
105 (void)OsalSemDestroy(&cntlr->sem); in CanCntlrCreateThread()
161 (void)OsalSemPost(&cntlr->sem); in CanCntlrDestroyThread()
169 (void)OsalSemDestroy(&cntlr->sem); in CanCntlrDestroyThread()
/drivers/hdf_core/framework/support/platform/include/hdmi/
H A Dhdmi_event.h38 struct OsalSem sem; member
/drivers/hdf_core/framework/support/platform/src/hdmi/
H A Dhdmi_event.c27 (void)OsalSemInit(&event->sem, 0); in HdmiEventPostMsg()
34 ret = OsalSemWait(&event->sem, HDF_WAIT_FOREVER); in HdmiEventPostMsg()
35 (void)OsalSemDestroy(&event->sem); in HdmiEventPostMsg()
241 (void)OsalSemPost(&event->sem); in HdmiEventMsgHandleDefault()
/drivers/peripheral/usb/ddk/host/src/
H A Dusb_io_manage.c136 HDF_LOGE("sem wait failed: %{public}d", ret); in IoAsyncReceiveProcess()
155 OsalSemPost(&interfacePool->submitRequestQueue.sem); in IoAsyncReceiveProcess()
170 OsalSemInit((struct OsalSem *)&interfacePool->submitRequestQueue.sem, 0); in UsbIoCreateQueue()
188 OsalSemDestroy((struct OsalSem *)&interfacePool->submitRequestQueue.sem); in UsbIoDestroyQueue()
204 OsalSemPost((struct OsalSem *)&msgQueue->sem); in UsbIoSendRequest()
220 ret = OsalSemWait((struct OsalSem *)&msgQueue->sem, HDF_WAIT_FOREVER); in UsbIoGetRequest()
328 OsalSemPost(&interfacePool->submitRequestQueue.sem); in UsbIoRecvProcessStop()
344 OsalSemPost(&interfacePool->submitRequestQueue.sem); in UsbIoStop()
406 OsalSemPost(&hostRequest->sem); in UsbIoSetRequestCompletionInfo()
/drivers/hdf_core/framework/support/platform/include/gpio/
H A Dgpio_core.h84 struct OsalSem sem; member
95 (void)OsalSemPost(&irqRecord->sem); in GpioIrqRecordTrigger()
108 (void)OsalSemPost(&irqRecord->sem); // this is the last post ... in GpioIrqRecordDestroy()
/drivers/hdf_core/framework/utils/include/
H A Dhdf_task_queue.h26 struct OsalSem sem; member
/drivers/hdf_core/framework/support/platform/include/fwk/
H A Dplatform_event.h26 struct OsalSem sem; member
H A Dplatform_queue.h38 struct OsalSem sem; member
/drivers/hdf_core/adapter/platform/spi/
H A Dspi_bes.c51 .sem = { NULL },
74 .sem = { NULL },
96 if (HDF_SUCCESS != OsalSemPost(&spiCtx[0].sem)) { in Spi0DmaIrq()
105 if (HDF_SUCCESS != OsalSemPost(&spiCtx[1].sem)) { in Spi1DmaIrq()
247 if (OsalSemWait(&spiCtx[spiId].sem, timeOut) != HDF_SUCCESS) { in HalSpiSend()
314 if (OsalSemWait(&spiCtx[spiId].sem, timeOut) <= 0) { in HalSpiRecv()
362 if (OsalSemWait(&spiCtx[spiId].sem, TIMEOUT) <= 0) { in HalSpiSendRecv()
405 if (&spiCtx[spiPort].sem == NULL) { in InitSpiDevice()
406 if (OsalSemInit(&spiCtx[spiPort].sem, 0) != HDF_SUCCESS) { in InitSpiDevice()
H A Dspi_bes.h57 struct OsalSem sem; member
/drivers/hdf_core/framework/model/network/wifi/platform/src/qos/
H A Dflow_control.c177 OsalSemPost(&fcm->sem[dir]); in SchedTransfer()
355 if (OsalSemInit(&fcm->sem[i], 0) != HDF_SUCCESS) { in InitFlowControl()
358 OsalSemDestroy(&fcm->sem[FLOW_TX]); in InitFlowControl()
369 (void)OsalSemDestroy(&fcm->sem[i]); in InitFlowControl()
393 OsalSemDestroy(&fcm->sem[i]); in DeInitFlowControl()
/drivers/hdf_core/framework/test/unittest/platform/virtual/
H A Dspi_virtual.c29 struct OsalSem sem; member
79 (void)OsalSemPost(&virtual->sem); in RingBufferWriteWord()
198 ret = OsalSemWait((struct OsalSem *)(&virtual->sem), WAIT_TIMEOUT); in VirtualSpiTxRx()
200 HDF_LOGE("VirtualSpiTxRx: sem wait timeout, ret: %d!", ret); in VirtualSpiTxRx()
397 ret = OsalSemInit(&virtual->sem, 0); in VirtualSpiInit()
466 (void)OsalSemDestroy(&virtual->sem); in VirtualSpiDeviceRelease()
/drivers/hdf_core/framework/model/storage/src/mmc/
H A Dmmc_core.c203 (void)OsalSemPost(&mmcMsg->sem); in MmcMsgHandleDefault()
349 (void)OsalSemInit(&mmcMsg->sem, 0); in MmcCntlrPostMsg()
356 ret = OsalSemWait(&mmcMsg->sem, HDF_WAIT_FOREVER); in MmcCntlrPostMsg()
357 (void)OsalSemDestroy(&mmcMsg->sem); in MmcCntlrPostMsg()
863 ret = OsalSemWait(&dev->sem, HDF_WAIT_FOREVER); in SdioIrqThreadWorker()
889 ret = OsalSemInit(&dev->sem, 0); in MmcCntlrCreatSdioIrqThread()
891 HDF_LOGE("MmcCntlrCreatSdioIrqThread: sem init fail, ret: %d!", ret); in MmcCntlrCreatSdioIrqThread()
898 (void)OsalSemDestroy(&dev->sem); in MmcCntlrCreatSdioIrqThread()
905 (void)OsalSemDestroy(&dev->sem); in MmcCntlrCreatSdioIrqThread()
915 (void)OsalSemDestroy(&dev->sem); in MmcCntlrCreatSdioIrqThread()
[all...]
/drivers/hdf_core/framework/model/network/wifi/platform/include/
H A Dflow_control.h214 struct OsalSem sem[FLOW_DIR_COUNT]; /**< Array of semaphores */ member

Completed in 18 milliseconds

12