/base/security/huks/services/huks_standard/huks_service/main/core/src/ |
D | hks_lock.c | 25 HksRwlock *lock; member 30 HksLock *lock = (HksLock *)HksMalloc(sizeof(HksLock)); in HksLockCreate() local 31 if (lock != NULL) { in HksLockCreate() 32 lock->lock = HksRwlockCreate(); in HksLockCreate() 33 if (lock->lock == NULL) { in HksLockCreate() 34 HksFree(lock); in HksLockCreate() 35 lock = NULL; in HksLockCreate() 38 return lock; in HksLockCreate() 41 int32_t HksLockLockRead(HksLock *lock) in HksLockLockRead() argument 43 HKS_IF_NULL_RETURN(lock, -1) in HksLockLockRead() [all …]
|
D | hks_lock_lite.c | 23 HksMutex *lock; member 28 HksLock *lock = HksMalloc(sizeof(HksLock)); in HksLockCreate() local 29 if (lock != NULL) { in HksLockCreate() 30 lock->lock = HksMutexCreate(); in HksLockCreate() 31 if (lock->lock == NULL) { in HksLockCreate() 32 HksFree(lock); in HksLockCreate() 33 lock = NULL; in HksLockCreate() 36 return lock; in HksLockCreate() 39 int32_t HksLockLockRead(HksLock *lock) in HksLockLockRead() argument 41 HKS_IF_NULL_RETURN(lock, -1) in HksLockLockRead() [all …]
|
D | hks_storage_file_lock.c | 30 HksLock *lock; member 39 static void FreeFileLock(HksStorageFileLock *lock) in FreeFileLock() argument 41 if (lock == NULL) { in FreeFileLock() 45 if (lock->path) { in FreeFileLock() 46 HksFree(lock->path); in FreeFileLock() 47 lock->path = NULL; in FreeFileLock() 50 if (lock->lock) { in FreeFileLock() 51 HksLockClose(lock->lock); in FreeFileLock() 52 lock->lock = NULL; in FreeFileLock() 55 HksFree(lock); in FreeFileLock() [all …]
|
/base/security/huks/services/huks_standard/huks_service/main/os_dependency/posix/ |
D | hks_rwlock.c | 24 pthread_rwlock_t lock; member 31 int result = pthread_rwlock_init(&rwLock->lock, NULL); in HksRwlockCreate() 40 int32_t HksRwlockLockRead(HksRwlock *lock) in HksRwlockLockRead() argument 42 HKS_IF_NULL_RETURN(lock, -1) in HksRwlockLockRead() 44 return pthread_rwlock_rdlock(&lock->lock); in HksRwlockLockRead() 47 int32_t HksRwlockUnlockRead(HksRwlock *lock) in HksRwlockUnlockRead() argument 49 HKS_IF_NULL_RETURN(lock, -1) in HksRwlockUnlockRead() 51 return pthread_rwlock_unlock(&lock->lock); in HksRwlockUnlockRead() 54 int32_t HksRwlockLockWrite(HksRwlock *lock) in HksRwlockLockWrite() argument 56 HKS_IF_NULL_RETURN(lock, -1) in HksRwlockLockWrite() [all …]
|
/base/powermgr/powermgr_lite/frameworks/src/ |
D | running_lock.c | 34 static BOOL AddRunningLock(RunningLock *lock) in AddRunningLock() argument 41 int16_t pos = VECTOR_Add(&g_runningLocks, (void *)lock); in AddRunningLock() 47 POWER_HILOGD("Add running lock, name: %s, type: %d", lock->name, lock->type); in AddRunningLock() 52 static BOOL RemoveRunningLock(const RunningLock *lock) in RemoveRunningLock() argument 55 int16_t pos = VECTOR_Find(&g_runningLocks, (void *)lock); in RemoveRunningLock() 62 POWER_HILOGD("Remove running lock, name: %s, type: %d", lock->name, lock->type); in RemoveRunningLock() 67 static BOOL IsRunningLockExisted(const RunningLock *lock) in IsRunningLockExisted() argument 69 if (lock == NULL) { in IsRunningLockExisted() 74 BOOL ret = (VECTOR_Find(&g_runningLocks, (void *)lock) >= 0) ? TRUE : FALSE; in IsRunningLockExisted() 88 entry->lock.type = type; in CreateRunningLockEntry() [all …]
|
/base/security/huks/test/unittest/huks_standard_test/storage_multithread_test/src/ |
D | hks_storage_file_lock_test.cpp | 34 HksStorageFileLock *lock = HksStorageFileLockCreate(&path[0]); variable 35 EXPECT_NE(lock, nullptr); 36 int32_t result = HksStorageFileLockRead(lock); 38 result = HksStorageFileUnlockRead(lock); 40 result = HksStorageFileLockWrite(lock); 42 result = HksStorageFileUnlockWrite(lock); 44 HksStorageFileLockRelease(lock); 53 HksStorageFileLock *lock = HksStorageFileLockCreate(&path[0]); variable 54 if (lock != nullptr) { 55 locks.push_back(lock); [all …]
|
/base/startup/init/services/param/linux/ |
D | param_osadp.c | 27 INIT_LOCAL_API int ParamRWMutexCreate(ParamRWMutex *lock) in ParamRWMutexCreate() argument 29 PARAM_CHECK(lock != NULL, return -1, "Invalid lock"); in ParamRWMutexCreate() 33 pthread_rwlock_init(&lock->rwlock, &rwlockatt); in ParamRWMutexCreate() 37 INIT_LOCAL_API int ParamRWMutexWRLock(ParamRWMutex *lock) in ParamRWMutexWRLock() argument 39 PARAM_CHECK(lock != NULL, return -1, "Invalid lock"); in ParamRWMutexWRLock() 40 pthread_rwlock_wrlock(&lock->rwlock); in ParamRWMutexWRLock() 43 INIT_LOCAL_API int ParamRWMutexRDLock(ParamRWMutex *lock) in ParamRWMutexRDLock() argument 45 PARAM_CHECK(lock != NULL, return -1, "Invalid lock"); in ParamRWMutexRDLock() 46 pthread_rwlock_rdlock(&lock->rwlock); in ParamRWMutexRDLock() 49 INIT_LOCAL_API int ParamRWMutexUnlock(ParamRWMutex *lock) in ParamRWMutexUnlock() argument [all …]
|
/base/startup/init/services/param/liteos/ |
D | param_osadp.c | 146 INIT_LOCAL_API int ParamRWMutexCreate(ParamRWMutex *lock) in ParamRWMutexCreate() argument 148 PARAM_CHECK(lock != NULL, return -1, "Invalid lock"); in ParamRWMutexCreate() 152 pthread_rwlock_init(&lock->rwlock, &rwlockatt); in ParamRWMutexCreate() 156 INIT_LOCAL_API int ParamRWMutexWRLock(ParamRWMutex *lock) in ParamRWMutexWRLock() argument 158 PARAM_CHECK(lock != NULL, return -1, "Invalid lock"); in ParamRWMutexWRLock() 159 pthread_rwlock_wrlock(&lock->rwlock); in ParamRWMutexWRLock() 162 INIT_LOCAL_API int ParamRWMutexRDLock(ParamRWMutex *lock) in ParamRWMutexRDLock() argument 164 PARAM_CHECK(lock != NULL, return -1, "Invalid lock"); in ParamRWMutexRDLock() 165 pthread_rwlock_rdlock(&lock->rwlock); in ParamRWMutexRDLock() 168 INIT_LOCAL_API int ParamRWMutexUnlock(ParamRWMutex *lock) in ParamRWMutexUnlock() argument [all …]
|
/base/global/resource_management_lite/frameworks/resmgr_lite/include/ |
D | auto_mutex.h | 25 explicit inline AutoMutex(Lock &lock) : lock_(lock) in AutoMutex() argument 26 { lock_.lock(); } in AutoMutex() 28 explicit inline AutoMutex(Lock *lock) : lock_(*lock) in AutoMutex() argument 29 { lock_.lock(); } in AutoMutex()
|
/base/global/resource_management/frameworks/resmgr/include/ |
D | auto_mutex.h | 25 explicit inline AutoMutex(Lock &lock) : lock_(lock) in AutoMutex() argument 26 { lock_.lock(); } in AutoMutex() 28 explicit inline AutoMutex(Lock *lock) : lock_(*lock) in AutoMutex() argument 29 { lock_.lock(); } in AutoMutex()
|
/base/security/huks/services/huks_standard/huks_service/main/core/include/ |
D | hks_rwlock.h | 28 int32_t HksRwlockLockRead(HksRwlock *lock); 29 int32_t HksRwlockUnlockRead(HksRwlock *lock); 30 int32_t HksRwlockLockWrite(HksRwlock *lock); 31 int32_t HksRwlockUnlockWrite(HksRwlock *lock); 32 void HksRwlockClose(HksRwlock *lock);
|
D | hks_lock.h | 28 int32_t HksLockLockRead(HksLock *lock); 29 int32_t HksLockUnlockRead(HksLock *lock); 30 int32_t HksLockLockWrite(HksLock *lock); 31 int32_t HksLockUnlockWrite(HksLock *lock); 32 void HksLockClose(HksLock *lock);
|
D | hks_storage_file_lock.h | 28 int32_t HksStorageFileLockRead(HksStorageFileLock *lock); 29 int32_t HksStorageFileUnlockRead(HksStorageFileLock *lock); 30 int32_t HksStorageFileLockWrite(HksStorageFileLock *lock); 31 int32_t HksStorageFileUnlockWrite(HksStorageFileLock *lock); 32 void HksStorageFileLockRelease(HksStorageFileLock *lock);
|
/base/location/services/location_locator/locator/source/ |
D | country_code_manager.cpp | 51 std::lock_guard lock(countryCodeCallbackMutex_); in NotifyAllListener() local 67 std::unique_lock<std::mutex> lock(countryCodeCallbackMutex_, std::defer_lock); in RegisterCountryCodeCallback() local 68 lock.lock(); in RegisterCountryCodeCallback() 71 lock.unlock(); in RegisterCountryCodeCallback() 78 lock.unlock(); in RegisterCountryCodeCallback() 86 lock.unlock(); in RegisterCountryCodeCallback() 89 lock.unlock(); in RegisterCountryCodeCallback() 96 std::unique_lock<std::mutex> lock(countryCodeCallbackMutex_, std::defer_lock); in UnregisterCountryCodeCallback() local 97 lock.lock(); in UnregisterCountryCodeCallback() 100 lock.unlock(); in UnregisterCountryCodeCallback() [all …]
|
/base/powermgr/powermgr_lite/frameworks/include/ |
D | running_lock_entry.h | 37 RunningLock lock; member 42 static inline RunningLockEntry *GetRunningLockEntry(const RunningLock *lock) in GetRunningLockEntry() argument 44 return GET_OBJECT(lock, RunningLockEntry, lock); in GetRunningLockEntry() 49 …return (entry != NULL) && ((entry->lock.type >= 0) && (entry->lock.type < RUNNINGLOCK_BUTT)) ? TRU… in IsValidRunningLockEntry()
|
/base/web/webview/interfaces/kits/napi/webviewcontroller/ |
D | webview_controller.cpp | 48 return nweb_.lock() ? true : false; in IsInit() 54 auto nweb_ptr = nweb_.lock(); in AccessForward() 64 auto nweb_ptr = nweb_.lock(); in AccessBackward() 74 auto nweb_ptr = nweb_.lock(); in AccessStep() 83 auto nweb_ptr = nweb_.lock(); in ClearHistory() 91 auto nweb_ptr = nweb_.lock(); in Forward() 99 auto nweb_ptr = nweb_.lock(); in Backward() 107 auto nweb_ptr = nweb_.lock(); in OnActive() 115 auto nweb_ptr = nweb_.lock(); in OnInactive() 123 auto nweb_ptr = nweb_.lock(); in Refresh() [all …]
|
/base/telephony/call_manager/services/call/src/ |
D | call_state_listener.cpp | 38 std::lock_guard<std::mutex> lock(mutex_); in AddOneObserver() local 52 std::lock_guard<std::mutex> lock(mutex_); in RemoveOneObserver() local 59 std::lock_guard<std::mutex> lock(mutex_); in RemoveAllObserver() local 70 std::lock_guard<std::mutex> lock(mutex_); in NewCallCreated() local 78 std::lock_guard<std::mutex> lock(mutex_); in CallDestroyed() local 91 std::lock_guard<std::mutex> lock(mutex_); in CallStateUpdated() local 103 std::lock_guard<std::mutex> lock(mutex_); in IncomingCallHungUp() local 115 std::lock_guard<std::mutex> lock(mutex_); in IncomingCallActivated() local 123 std::lock_guard<std::mutex> lock(mutex_); in CallEventUpdated() local
|
D | call_base.cpp | 86 std::lock_guard<std::mutex> lock(mutex_); in GetCallAttributeBaseInfo() local 119 std::lock_guard<std::mutex> lock(mutex_); in GetCallID() local 130 std::lock_guard<std::mutex> lock(mutex_); in GetCallRunningState() local 137 std::lock_guard<std::mutex> lock(mutex_); in SetTelCallState() local 241 std::lock_guard<std::mutex> lock(mutex_); in GetTelCallState() local 247 std::lock_guard<std::mutex> lock(mutex_); in SetTelConferenceState() local 254 std::lock_guard<std::mutex> lock(mutex_); in GetTelConferenceState() local 260 std::lock_guard<std::mutex> lock(mutex_); in GetVideoStateType() local 266 std::lock_guard<std::mutex> lock(mutex_); in SetVideoStateType() local 272 std::lock_guard<std::mutex> lock(mutex_); in SetPolicyFlag() local [all …]
|
/base/theme/wallpaper_mgr/utils/include/ |
D | concurrent_map.h | 49 std::lock_guard<decltype(mutex_)> lock(mutex_); 65 std::lock_guard<decltype(mutex_)> lock(mutex_); 73 std::lock_guard<decltype(mutex_)> lock(mutex_); in Emplace() 80 std::lock_guard<decltype(mutex_)> lock(mutex_); in Find() 91 std::lock_guard<decltype(mutex_)> lock(mutex_); in Contains() 98 std::lock_guard<decltype(mutex_)> lock(mutex_); in InsertOrAssign() 105 std::lock_guard<decltype(mutex_)> lock(mutex_); in Insert() 112 std::lock_guard<decltype(mutex_)> lock(mutex_); in Erase() 118 std::lock_guard<decltype(mutex_)> lock(mutex_); in Clear() 124 std::lock_guard<decltype(mutex_)> lock(mutex_); in Empty() [all …]
|
/base/global/resource_management/frameworks/resmgr/test/unittest/common/ |
D | string_utils_test.cpp | 73 void FuncMultiThread(int* num, Lock* lock) in FuncMultiThread() argument 75 AutoMutex mtx(*lock); in FuncMultiThread() 81 void TestThread(int* num, int threadNum, Lock* lock) in TestThread() argument 85 threads.push_back(std::thread(FuncMultiThread, num, lock)); in TestThread() 102 Lock lock; variable 103 TestThread(&num, threadNum, &lock);
|
/base/global/resource_management_lite/frameworks/resmgr_lite/test/unittest/lite/common/ |
D | string_utils_test.cpp | 74 void FuncMultiThread(int* num, Lock* lock) in FuncMultiThread() argument 76 AutoMutex mtx(*lock); in FuncMultiThread() 82 void TestThread(int* num, int threadNum, Lock* lock) in TestThread() argument 86 threads.push_back(std::thread(FuncMultiThread, num, lock)); in TestThread() 103 Lock lock; variable 104 TestThread(&num, threadNum, &lock);
|
/base/telephony/core_service/services/network_search/src/ |
D | network_search_state.cpp | 55 std::lock_guard<std::mutex> lock(mutex_); in SetOperatorInfo() local 67 std::lock_guard<std::mutex> lock(mutex_); in SetEmergency() local 75 std::lock_guard<std::mutex> lock(mutex_); in IsEmergency() local 84 std::lock_guard<std::mutex> lock(mutex_); in SetNetworkType() local 92 std::lock_guard<std::mutex> lock(mutex_); in SetNetworkState() local 100 std::lock_guard<std::mutex> lock(mutex_); in SetNetworkStateToRoaming() local 108 std::lock_guard<std::mutex> lock(imsMutex_); in GetImsStatus() local 134 std::lock_guard<std::mutex> lock(imsMutex_); in SetImsStatus() local 168 std::lock_guard<std::mutex> lock(imsMutex_); in SetImsServiceStatus() local 216 std::lock_guard<std::mutex> lock(mutex_); in GetNetworkStatus() local [all …]
|
/base/telephony/call_manager/frameworks/native/src/ |
D | call_ability_callback.cpp | 29 std::lock_guard<std::mutex> lock(mutex_); in SetProcessCallback() local 40 std::lock_guard<std::mutex> lock(mutex_); in OnCallDetailsChange() local 49 std::lock_guard<std::mutex> lock(mutex_); in OnCallEventChange() local 58 std::lock_guard<std::mutex> lock(mutex_); in OnCallDisconnectedCause() local 67 std::lock_guard<std::mutex> lock(mutex_); in OnReportAsyncResults() local 76 std::lock_guard<std::mutex> lock(mutex_); in OnReportMmiCodeResult() local 85 std::lock_guard<std::mutex> lock(mutex_); in OnOttCallRequest() local
|
D | call_manager_proxy.cpp | 63 std::lock_guard<std::mutex> lock(mutex_); in Init() local 129 std::lock_guard<std::mutex> lock(mutex_); in UnInit() local 139 std::lock_guard<std::mutex> lock(mutex_); in RegisterCallBack() local 174 std::lock_guard<std::mutex> lock(mutex_); in UnRegisterCallBack() local 269 std::lock_guard<std::mutex> lock(mutex_); in ReRegisterCallBack() local 298 std::lock_guard<std::mutex> lock(mutex_); in DialCall() local 313 std::lock_guard<std::mutex> lock(mutex_); in AnswerCall() local 328 std::lock_guard<std::mutex> lock(mutex_); in RejectCall() local 343 std::lock_guard<std::mutex> lock(mutex_); in HangUpCall() local 358 std::lock_guard<std::mutex> lock(mutex_); in GetCallState() local [all …]
|
/base/powermgr/powermgr_lite/interfaces/kits/ |
D | running_lock.h | 61 void DestroyRunningLock(const RunningLock *lock); 62 BOOL AcquireRunningLock(const RunningLock *lock); 63 BOOL ReleaseRunningLock(const RunningLock *lock); 64 BOOL IsRunningLockHolding(const RunningLock *lock);
|