/drivers/hdf_core/adapter/khdf/linux/osal/src/ |
H A D | osal_mutex.c | 21 #include <linux/mutex.h> 27 int32_t OsalMutexInit(struct OsalMutex *mutex) in OsalMutexInit() argument 29 struct mutex *mutex_tmp = NULL; in OsalMutexInit() 31 if (mutex == NULL) { in OsalMutexInit() 36 mutex_tmp = (struct mutex *)OsalMemCalloc(sizeof(*mutex_tmp)); in OsalMutexInit() 42 mutex->realMutex = (void *)mutex_tmp; in OsalMutexInit() 48 int32_t OsalMutexDestroy(struct OsalMutex *mutex) in OsalMutexDestroy() argument 50 if (mutex == NULL || mutex->realMutex == NULL) { in OsalMutexDestroy() 55 mutex_destroy((struct mutex *)mute in OsalMutexDestroy() 63 OsalMutexLock(struct OsalMutex *mutex) OsalMutexLock() argument 76 OsalMutexTimedLock(struct OsalMutex *mutex, uint32_t mSec) OsalMutexTimedLock() argument 90 OsalMutexUnlock(struct OsalMutex *mutex) OsalMutexUnlock() argument [all...] |
H A D | osal_timer.c | 40 struct OsalMutex mutex; member 59 OsalMutexTimedLock(&ktimer->mutex, HDF_WAIT_FOREVER); in osal_timer_callback() 62 OsalMutexUnlock(&ktimer->mutex); in osal_timer_callback() 66 OsalMutexTimedLock(&ktimer->mutex, HDF_WAIT_FOREVER); in osal_timer_callback() 68 OsalMutexUnlock(&ktimer->mutex); in osal_timer_callback() 75 OsalMutexDestroy(&ktimer->mutex); in osal_timer_callback() 101 OsalMutexInit(&ktimer->mutex); in OsalTimerCreate() 154 OsalMutexTimedLock(&ktimer->mutex, HDF_WAIT_FOREVER); in OsalTimerSetTimeout() 156 OsalMutexUnlock(&ktimer->mutex); in OsalTimerSetTimeout() 172 OsalMutexTimedLock(&ktimer->mutex, HDF_WAIT_FOREVE in OsalTimerDelete() [all...] |
/drivers/hdf_core/adapter/khdf/uniproton/osal/src/ |
H A D | osal_mutex.c | 40 int32_t OsalMutexInit(struct OsalMutex *mutex) in OsalMutexInit() argument 42 (void)mutex; in OsalMutexInit() 50 int32_t OsalMutexDestroy(struct OsalMutex *mutex) in OsalMutexDestroy() argument 52 (void)mutex; in OsalMutexDestroy() 60 int32_t OsalMutexLock(struct OsalMutex *mutex) in OsalMutexLock() argument 62 (void)mutex; in OsalMutexLock() 70 int32_t OsalMutexTimedLock(struct OsalMutex *mutex, uint32_t ms) in OsalMutexTimedLock() argument 72 (void)mutex; in OsalMutexTimedLock() 81 int32_t OsalMutexUnlock(struct OsalMutex *mutex) in OsalMutexUnlock() argument 83 (void)mutex; in OsalMutexUnlock() [all...] |
/drivers/hdf_core/adapter/khdf/liteos/osal/src/ |
H A D | osal_mutex.c | 39 int32_t OsalMutexInit(struct OsalMutex *mutex) in OsalMutexInit() argument 44 if (mutex == NULL) { in OsalMutexInit() 52 mutex->realMutex = NULL; in OsalMutexInit() 57 mutex->realMutex = (void *)mux; in OsalMutexInit() 59 mutex->realMutex = NULL; in OsalMutexInit() 68 int32_t OsalMutexDestroy(struct OsalMutex *mutex) in OsalMutexDestroy() argument 72 if (mutex == NULL || mutex->realMutex == NULL) { in OsalMutexDestroy() 77 ret = LOS_MuxDestroy((LosMux *)mutex->realMutex); in OsalMutexDestroy() 83 OsalMemFree(mutex in OsalMutexDestroy() 88 OsalMutexLock(struct OsalMutex *mutex) OsalMutexLock() argument 106 OsalMutexTimedLock(struct OsalMutex *mutex, uint32_t ms) OsalMutexTimedLock() argument 127 OsalMutexUnlock(struct OsalMutex *mutex) OsalMutexUnlock() argument [all...] |
/drivers/hdf_core/framework/support/posix/src/ |
H A D | osal_mutex.c | 18 int32_t OsalMutexInit(struct OsalMutex *mutex) in OsalMutexInit() argument 23 if (mutex == NULL) { in OsalMutexInit() 28 mutex->realMutex = NULL; in OsalMutexInit() 38 HDF_LOGE("%s: failed to init pthread mutex %d", __func__, ret); in OsalMutexInit() 43 mutex->realMutex = (void *)mutexTmp; in OsalMutexInit() 48 int32_t OsalMutexDestroy(struct OsalMutex *mutex) in OsalMutexDestroy() argument 52 if (mutex == NULL || mutex->realMutex == NULL) { in OsalMutexDestroy() 56 ret = pthread_mutex_destroy((pthread_mutex_t *)mutex->realMutex); in OsalMutexDestroy() 58 HDF_LOGE("%s: failed to destroy pthread mutex in OsalMutexDestroy() 67 OsalMutexLock(struct OsalMutex *mutex) OsalMutexLock() argument 76 OsalMutexTimedLock(struct OsalMutex *mutex, uint32_t ms) OsalMutexTimedLock() argument 115 OsalMutexUnlock(struct OsalMutex *mutex) OsalMutexUnlock() argument [all...] |
/drivers/hdf_core/adapter/khdf/liteos_m/osal/src/ |
H A D | osal_mutex.c | 39 int32_t OsalMutexInit(struct OsalMutex *mutex) in OsalMutexInit() argument 44 if (mutex == NULL) { in OsalMutexInit() 51 mutex->realMutex = (void *)(uintptr_t)muxId; in OsalMutexInit() 53 mutex->realMutex = (void *)(uintptr_t)HDF_INVALID_MUX_ID; in OsalMutexInit() 61 int32_t OsalMutexDestroy(struct OsalMutex *mutex) in OsalMutexDestroy() argument 65 if (mutex == NULL || mutex->realMutex == (void *)(uintptr_t)HDF_INVALID_MUX_ID) { in OsalMutexDestroy() 70 ret = LOS_MuxDelete((uint32_t)(uintptr_t)mutex->realMutex); in OsalMutexDestroy() 76 mutex->realMutex = (void *)(uintptr_t)HDF_INVALID_MUX_ID; in OsalMutexDestroy() 80 int32_t OsalMutexLock(struct OsalMutex *mutex) in OsalMutexLock() argument 98 OsalMutexTimedLock(struct OsalMutex *mutex, uint32_t ms) OsalMutexTimedLock() argument 119 OsalMutexUnlock(struct OsalMutex *mutex) OsalMutexUnlock() argument [all...] |
/drivers/hdf_core/interfaces/inner_api/osal/shared/ |
H A D | osal_mutex.h | 16 * including the memory management, thread, mutex, spinlock, semaphore, timer, file, interrupt, time, 26 * @brief Declares mutex types and interfaces. 28 * This file provides interfaces for initializing and destroying a mutex, locking a mutex, 29 * locking a mutex upon timeout, and unlocking a mutex. The mutex must be destroyed after being used. 44 * @brief Describes a mutex. 47 void *realMutex; /**< Pointer to a mutex object to operate */ 51 * @brief Defines a mutex [all...] |
/drivers/peripheral/camera/vdi_base/common/buffer_manager/src/ |
H A D | image_buffer.cpp | 181 std::lock_guard<std::mutex> l(l_); in SetIndex() 188 std::lock_guard<std::mutex> l(l_); in SetWidth() 195 std::lock_guard<std::mutex> l(l_); in SetCurWidth() 202 std::lock_guard<std::mutex> l(l_); in SetHeight() 209 std::lock_guard<std::mutex> l(l_); in SetCurHeight() 216 std::lock_guard<std::mutex> l(l_); in SetStride() 223 std::lock_guard<std::mutex> l(l_); in SetFormat() 229 std::lock_guard<std::mutex> l(l_); in SetCurFormat() 236 std::lock_guard<std::mutex> l(l_); in SetSize() 242 std::lock_guard<std::mutex> in SetSuffaceBufferAddr() [all...] |
H A D | buffer_loop_tracking.cpp | 28 std::lock_guard<std::mutex> l(lock_); in ~TrackingNode() 44 std::lock_guard<std::mutex> l(lock_); in FindTrackingBuffer() 58 std::lock_guard<std::mutex> l(lock_); in AttachTrackingBuffer() 68 std::lock_guard<std::mutex> l(lock_); in DetachTrackingBuffer() 83 std::lock_guard<std::mutex> l(lock_); in IsEmpty() 95 std::lock_guard<std::mutex> l(lock_); in ~TrackingStream() 107 std::lock_guard<std::mutex> l(lock_); in FindTrackingNode() 124 std::lock_guard<std::mutex> l(lock_); in AttachTrackingNode() 139 std::lock_guard<std::mutex> l(lock_); in DetachTrackingNode() 152 std::lock_guard<std::mutex> in LocateBuffer() [all...] |
/drivers/peripheral/distributed_camera/hdi_service/src/dstream_operator/ |
H A D | dimage_buffer.cpp | 108 std::lock_guard<std::mutex> l(l_); in SetIndex() 115 std::lock_guard<std::mutex> l(l_); in SetWidth() 122 std::lock_guard<std::mutex> l(l_); in SetHeight() 129 std::lock_guard<std::mutex> l(l_); in SetStride() 136 std::lock_guard<std::mutex> l(l_); in SetFormat() 143 std::lock_guard<std::mutex> l(l_); in SetSize() 150 std::lock_guard<std::mutex> l(l_); in SetUsage() 157 std::lock_guard<std::mutex> l(l_); in SetPhyAddress() 164 std::lock_guard<std::mutex> l(l_); in SetFileDescriptor() 171 std::lock_guard<std::mutex> in SetTimestamp() [all...] |
/drivers/peripheral/vibrator/hal/src/ |
H A D | vibrator_controller.c | 91 (void)OsalMutexLock(&priv->mutex); in GetVibratorInfo() 95 (void)OsalMutexUnlock(&priv->mutex); in GetVibratorInfo() 103 (void)OsalMutexUnlock(&priv->mutex); in GetVibratorInfo() 109 (void)OsalMutexUnlock(&priv->mutex); in GetVibratorInfo() 114 (void)OsalMutexUnlock(&priv->mutex); in GetVibratorInfo() 156 (void)OsalMutexLock(&priv->mutex); in EnableVibratorModulation() 160 (void)OsalMutexUnlock(&priv->mutex); in EnableVibratorModulation() 167 (void)OsalMutexUnlock(&priv->mutex); in EnableVibratorModulation() 174 (void)OsalMutexUnlock(&priv->mutex); in EnableVibratorModulation() 181 (void)OsalMutexUnlock(&priv->mutex); in EnableVibratorModulation() [all...] |
/drivers/hdf_core/framework/utils/src/ |
H A D | osal_msg_queue.c | 16 OsalMutexInit(&queue->mutex); in OsalMessageQueueInit() 25 OsalMutexDestroy(&queue->mutex); in OsalMessageQueueDestroy() 41 OsalMutexLock(&queue->mutex); in HdfMessageQueueEnqueue() 53 OsalMutexUnlock(&queue->mutex); in HdfMessageQueueEnqueue() 63 OsalMutexLock(&queue->mutex); in HdfMessageQueueNext() 69 OsalMutexUnlock(&queue->mutex); in HdfMessageQueueNext() 74 OsalMutexUnlock(&queue->mutex); in HdfMessageQueueNext() 82 OsalMutexLock(&queue->mutex); in HdfMessageQueueFlush() 89 OsalMutexUnlock(&queue->mutex); in HdfMessageQueueFlush()
|
/drivers/peripheral/camera/vdi_base/common/adapter/platform/hdf_driver/src/driver_adapter/include/ |
H A D | buffer_operator.h | 100 std::mutex l_; 217 std::lock_guard<std::mutex> l(l_); in SetIndex() 224 std::lock_guard<std::mutex> l(l_); in SetWidth() 231 std::lock_guard<std::mutex> l(l_); in SetHeight() 238 std::lock_guard<std::mutex> l(l_); in SetStride() 245 std::lock_guard<std::mutex> l(l_); in SetFormat() 252 std::lock_guard<std::mutex> l(l_); in SetSize() 259 std::lock_guard<std::mutex> l(l_); in SetUsage() 266 std::lock_guard<std::mutex> l(l_); in SetVirAddress() 273 std::lock_guard<std::mutex> in SetPhyAddress() [all...] |
/drivers/hdf_core/adapter/uhdf2/host/src/ |
H A D | devhost_dump.c | 36 struct OsalMutex mutex; member 44 OsalMutexInit(&g_dumpHostNode.mutex); in DevHostDumpInit() 54 OsalMutexLock(&g_dumpHostNode.mutex); in DevHostDumpDeInit() 60 OsalMutexUnlock(&g_dumpHostNode.mutex); in DevHostDumpDeInit() 62 OsalMutexDestroy(&g_dumpHostNode.mutex); in DevHostDumpDeInit() 71 OsalMutexLock(&g_dumpHostNode.mutex); in DevHostCheckDumpExist() 78 OsalMutexUnlock(&g_dumpHostNode.mutex); in DevHostCheckDumpExist() 105 OsalMutexLock(&g_dumpHostNode.mutex); in DevHostRegisterDumpService() 107 OsalMutexUnlock(&g_dumpHostNode.mutex); in DevHostRegisterDumpService() 164 OsalMutexLock(&g_dumpHostNode.mutex); in DevHostDump() [all...] |
/drivers/peripheral/input/hal/src/ |
H A D | input_controller.c | 212 pthread_mutex_lock(&manager->mutex);
in SetPowerStatus() 218 pthread_mutex_unlock(&manager->mutex);
in SetPowerStatus() 222 pthread_mutex_unlock(&manager->mutex);
in SetPowerStatus() 226 pthread_mutex_unlock(&manager->mutex);
in SetPowerStatus() 243 pthread_mutex_lock(&manager->mutex);
in GetPowerStatus() 249 pthread_mutex_unlock(&manager->mutex);
in GetPowerStatus() 254 pthread_mutex_unlock(&manager->mutex);
in GetPowerStatus() 258 pthread_mutex_unlock(&manager->mutex);
in GetPowerStatus() 262 pthread_mutex_unlock(&manager->mutex);
in GetPowerStatus() 279 pthread_mutex_lock(&manager->mutex);
in GetDeviceType() [all...] |
H A D | input_reporter.c | 109 pthread_mutex_lock(&manager->mutex);
in RegisterReportCallback() 116 pthread_mutex_unlock(&manager->mutex);
in RegisterReportCallback() 121 pthread_mutex_unlock(&manager->mutex);
in RegisterReportCallback() 128 pthread_mutex_unlock(&manager->mutex);
in RegisterReportCallback() 134 pthread_mutex_unlock(&manager->mutex);
in RegisterReportCallback() 151 pthread_mutex_lock(&manager->mutex);
in UnregisterReportCallback() 158 pthread_mutex_unlock(&manager->mutex);
in UnregisterReportCallback() 166 pthread_mutex_unlock(&manager->mutex);
in UnregisterReportCallback() 170 pthread_mutex_unlock(&manager->mutex);
in UnregisterReportCallback() 176 pthread_mutex_unlock(&manager->mutex);
in UnregisterReportCallback() [all...] |
/drivers/peripheral/light/hal/src/ |
H A D | light_controller.c | 145 (void)OsalMutexLock(&priv->mutex); in GetLightInfo() 149 (void)OsalMutexUnlock(&priv->mutex); in GetLightInfo() 157 (void)OsalMutexUnlock(&priv->mutex); in GetLightInfo() 163 (void)OsalMutexUnlock(&priv->mutex); in GetLightInfo() 168 (void)OsalMutexUnlock(&priv->mutex); in GetLightInfo() 213 (void)OsalMutexLock(&priv->mutex); in OnLight() 218 (void)OsalMutexUnlock(&priv->mutex); in OnLight() 225 (void)OsalMutexUnlock(&priv->mutex); in OnLight() 232 (void)OsalMutexUnlock(&priv->mutex); in OnLight() 239 (void)OsalMutexUnlock(&priv->mutex); in OnLight() [all...] |
/drivers/peripheral/usb/ddk_service/src/ |
H A D | usb_ddk_hash.cpp | 17 #include <mutex> 25 std::mutex g_mapMutex; 31 std::lock_guard<std::mutex> lock(g_mapMutex); in UsbDdkHash() 44 std::lock_guard<std::mutex> lock(g_mapMutex); in UsbDdkUnHash() 55 std::lock_guard<std::mutex> lock(g_mapMutex); in UsbDdkDelHashRecord() 61 std::lock_guard<std::mutex> lock(g_mapMutex); in UsbDdkGetRecordByVal()
|
/drivers/hdf_core/adapter/uhdf2/hdi/src/ |
H A D | stub_collector.cpp | 19 #include <mutex> 23 static std::mutex g_consMapLock; 24 static std::mutex g_stubMapLock; 32 const std::lock_guard<std::mutex> lock(g_consMapLock); in StubConstructorRegister() 47 const std::lock_guard<std::mutex> lock(g_consMapLock); in StubConstructorUnregister() 57 const std::lock_guard<std::mutex> stublock(g_stubMapLock); in StubCollectorGetOrNewObject() 64 const std::lock_guard<std::mutex> lock(g_consMapLock); in StubCollectorGetOrNewObject() 95 const std::lock_guard<std::mutex> stublock(g_stubMapLock); in StubCollectorRemoveObject() 100 const std::lock_guard<std::mutex> lock(g_consMapLock); in StubCollectorRemoveObject()
|
/drivers/hdf_core/adapter/uhdf2/manager/src/ |
H A D | servstat_listener_holder.c | 31 struct OsalMutex mutex; member 37 .mutex = { 49 OsalMutexInit(&g_holoderList.mutex); in UServStatListenerHolderListInit() 60 OsalMutexLock(&g_holoderList.mutex); in UServStatListenerHolderListListAdd() 62 OsalMutexUnlock(&g_holoderList.mutex); in UServStatListenerHolderListListAdd() 123 OsalMutexLock(&g_holoderList.mutex); in ServStatListenerHolderGet() 130 OsalMutexUnlock(&g_holoderList.mutex); in ServStatListenerHolderGet() 169 OsalMutexLock(&g_holoderList.mutex); in ServStatListenerHolderRelease() 171 OsalMutexUnlock(&g_holoderList.mutex); in ServStatListenerHolderRelease()
|
/drivers/hdf_core/framework/core/manager/src/ |
H A D | devsvc_manager.c | 94 OsalMutexLock(&devSvcManager->mutex); in DevSvcManagerAddService() 99 OsalMutexUnlock(&devSvcManager->mutex); in DevSvcManagerAddService() 103 OsalMutexUnlock(&devSvcManager->mutex); in DevSvcManagerAddService() 124 OsalMutexLock(&devSvcManager->mutex); in DevSvcManagerAddService() 127 OsalMutexUnlock(&devSvcManager->mutex); in DevSvcManagerAddService() 141 OsalMutexLock(&devSvcManager->mutex); in DevSvcManagerUpdateService() 144 OsalMutexUnlock(&devSvcManager->mutex); in DevSvcManagerUpdateService() 151 OsalMutexUnlock(&devSvcManager->mutex); in DevSvcManagerUpdateService() 162 OsalMutexUnlock(&devSvcManager->mutex); in DevSvcManagerUpdateService() 195 OsalMutexLock(&devSvcManager->mutex); in DevSvcManagerRemoveService() [all...] |
H A D | servstat_listener_holder.c | 22 struct OsalMutex mutex; member 30 OsalMutexInit(&g_holoderList.mutex); in KServStatListenerHolderListInit() 103 OsalMutexLock(&g_holoderList.mutex); in ServStatListenerHolderCreate() 105 OsalMutexUnlock(&g_holoderList.mutex); in ServStatListenerHolderCreate() 114 OsalMutexLock(&g_holoderList.mutex); in ServStatListenerHolderGet() 121 OsalMutexUnlock(&g_holoderList.mutex); in ServStatListenerHolderGet() 133 OsalMutexLock(&g_holoderList.mutex); in ServStatListenerHolderRelease() 137 OsalMutexUnlock(&g_holoderList.mutex); in ServStatListenerHolderRelease()
|
/drivers/hdf_core/framework/core/adapter/syscall/src/ |
H A D | hdf_syscall_adapter.c | 121 OsalMutexLock(&adapter->mutex); in HdfDevEventDispatchLocked() 131 OsalMutexUnlock(&adapter->mutex); in HdfDevEventDispatchLocked() 151 OsalMutexLock(&thread->mutex); in HdfDevEventReadAndDispatch() 186 OsalMutexUnlock(&thread->mutex); in HdfDevEventReadAndDispatch() 195 OsalMutexLock(&thread->mutex); in AssignPfds() 200 OsalMutexUnlock(&thread->mutex); in AssignPfds() 219 OsalMutexUnlock(&thread->mutex); in AssignPfds() 286 OsalMutexDestroy(&thread->mutex); in HdfDevEventListenTask() 334 if (OsalMutexInit(&thread->mutex) != HDF_SUCCESS) { in HdfDevListenerThreadDoInit() 343 OsalMutexDestroy(&thread->mutex); in HdfDevListenerThreadDoInit() [all...] |
/drivers/hdf_core/framework/model/misc/vibrator/driver/src/ |
H A D | vibrator_driver.c | 35 (void)OsalMutexLock(&drvData->mutex); in RegisterVibratorOps() 40 (void)OsalMutexUnlock(&drvData->mutex); in RegisterVibratorOps() 52 (void)OsalMutexLock(&drvData->mutex); in RegisterVibratorInfo() 54 (void)OsalMutexUnlock(&drvData->mutex); in RegisterVibratorInfo() 58 (void)OsalMutexUnlock(&drvData->mutex); in RegisterVibratorInfo() 144 (void)OsalMutexLock(&drvData->mutex); in StartOnce() 146 (void)OsalMutexUnlock(&drvData->mutex); in StartOnce() 181 (void)OsalMutexLock(&drvData->mutex); in StartEffect() 183 (void)OsalMutexUnlock(&drvData->mutex); in StartEffect() 230 (void)OsalMutexLock(&drvData->mutex); in Stop() [all...] |
/drivers/interface/display/composer/cache_manager/ |
H A D | cache_manager.h | 24 #include <mutex> 50 std::lock_guard<std::mutex> lock(mutex_); in ~CacheManager() 78 std::lock_guard<std::mutex> lock(mutex_); in Size() 84 std::lock_guard<std::mutex> lock(mutex_); in InsertCache() 104 std::lock_guard<std::mutex> lock(mutex_); in EraseCache() 120 std::lock_guard<std::mutex> lock(mutex_); in SearchCache() 131 std::lock_guard<std::mutex> lock(mutex_); in TravelCaches() 152 std::mutex mutex_; 166 std::lock_guard<std::mutex> lock(mutex_); in ~CacheManager() 194 std::lock_guard<std::mutex> loc in Size() [all...] |