Home
last modified time | relevance | path

Searched refs:lock (Results 1 – 25 of 3454) sorted by relevance

12345678910>>...139

/ohos5.0/base/security/huks/services/huks_standard/huks_service/main/hks_storage/src/
H A Dhks_storage_file_lock.c30 HksLock *lock; member
50 if (lock->lock) { in FreeFileLock()
51 HksLockClose(lock->lock); in FreeFileLock()
52 lock->lock = NULL; in FreeFileLock()
104 lock->lock = HksLockCreate(); in AllocFileLock()
107 if (lock->path == NULL || lock->lock == NULL) { in AllocFileLock()
111 return lock; in AllocFileLock()
166 return HksLockLockRead(lock->lock); in HksStorageFileLockRead()
173 return HksLockUnlockRead(lock->lock); in HksStorageFileUnlockRead()
180 return HksLockLockWrite(lock->lock); in HksStorageFileLockWrite()
[all …]
H A Dhks_lock.c25 HksRwlock *lock; member
31 if (lock != NULL) { in HksLockCreate()
32 lock->lock = HksRwlockCreate(); in HksLockCreate()
33 if (lock->lock == NULL) { in HksLockCreate()
38 return lock; in HksLockCreate()
45 return HksRwlockLockRead(lock->lock); in HksLockLockRead()
52 return HksRwlockUnlockRead(lock->lock); in HksLockUnlockRead()
59 return HksRwlockLockWrite(lock->lock); in HksLockLockWrite()
66 return HksRwlockUnlockWrite(lock->lock); in HksLockUnlockWrite()
74 HksRwlockClose(lock->lock); in HksLockClose()
[all …]
H A Dhks_lock_lite.c23 HksMutex *lock; member
29 if (lock != NULL) { in HksLockCreate()
30 lock->lock = HksMutexCreate(); in HksLockCreate()
31 if (lock->lock == NULL) { in HksLockCreate()
36 return lock; in HksLockCreate()
43 return HksMutexLock(lock->lock); in HksLockLockRead()
50 return HksMutexUnlock(lock->lock); in HksLockUnlockRead()
57 return HksMutexLock(lock->lock); in HksLockLockWrite()
64 return HksMutexUnlock(lock->lock); in HksLockUnlockWrite()
72 HksMutexClose(lock->lock); in HksLockClose()
[all …]
/ohos5.0/base/security/huks/services/huks_standard/huks_service/main/os_dependency/posix/
H A Dhks_rwlock.c24 pthread_rwlock_t lock; member
42 HKS_IF_NULL_RETURN(lock, -1) in HksRwlockLockRead()
44 return pthread_rwlock_rdlock(&lock->lock); in HksRwlockLockRead()
49 HKS_IF_NULL_RETURN(lock, -1) in HksRwlockUnlockRead()
51 return pthread_rwlock_unlock(&lock->lock); in HksRwlockUnlockRead()
56 HKS_IF_NULL_RETURN(lock, -1) in HksRwlockLockWrite()
58 return pthread_rwlock_wrlock(&lock->lock); in HksRwlockLockWrite()
65 return pthread_rwlock_unlock(&lock->lock); in HksRwlockUnlockWrite()
70 if (lock == NULL) { in HksRwlockClose()
74 pthread_rwlock_destroy(&lock->lock); in HksRwlockClose()
[all …]
/ohos5.0/foundation/multimedia/av_codec/test/unittest/video_test/vcodec_server_test/mock/
H A Dcodecbase_mock.cpp35 auto mock = g_mockObject.lock(); in CreateByName()
44 auto mock = g_mockObject.lock(); in CreateByName()
53 auto mock = g_mockObject.lock(); in CreateByName()
62 auto mock = g_mockObject.lock(); in GetCapabilityList()
73 auto mock = g_mockObject.lock(); in GetCapabilityList()
84 auto mock = g_mockObject.lock(); in GetCapabilityList()
102 auto mock = g_mockObject.lock(); in CodecBase()
116 auto mock = g_mockObject.lock(); in SetCallback()
126 auto mock = g_mockObject.lock(); in SetCallback()
136 auto mock = g_mockObject.lock(); in Configure()
[all …]
/ohos5.0/base/powermgr/powermgr_lite/frameworks/src/
H A Drunning_lock.c34 static BOOL AddRunningLock(RunningLock *lock) in AddRunningLock() argument
47 POWER_HILOGD("Add running lock, name: %s, type: %d", lock->name, lock->type); in AddRunningLock()
62 POWER_HILOGD("Remove running lock, name: %s, type: %d", lock->name, lock->type); in RemoveRunningLock()
69 if (lock == NULL) { in IsRunningLockExisted()
88 entry->lock.type = type; in CreateRunningLockEntry()
89 entry->lock.flag = flag; in CreateRunningLockEntry()
90 if (strcpy_s(entry->lock.name, sizeof(entry->lock.name), name) != EOK) { in CreateRunningLockEntry()
117 AddRunningLock(&entry->lock); in CreateRunningLock()
119 return &entry->lock; in CreateRunningLock()
154 if (lock == NULL) { in DestroyRunningLock()
[all …]
/ohos5.0/docs/en/device-dev/kernel/
H A Dkernel-small-basic-trans-rwlock.md12 - If there is no lock in write mode in the protected area, any task can add a lock in read mode.
23 How does an RW lock implement lock in read mode and lock in write mode to control read/write access…
27 … If task A acquires the lock in read mode, the RW lock count increments by 1 when a task acquires …
35 **Table 1** APIs of the RW lock module
39 | LOS_RwlockInit| Creates an RW lock.|
59 - If the lock is not held, the read task can acquire the lock.
61 … - If the lock is held, the read task acquires the lock and is executed based on the task priority.
63 …- If the lock in write mode is held by another task, the task cannot acquire the lock until the lo…
67 …f the lock is not held or if the task that holds the lock in read mode is the one that requests th…
69 …- If the lock already has a lock in read mode and the read task has a higher priority, the current…
[all …]
H A Dkernel-small-basic-trans-user-mutex.md6lock logic to form a user-mode lock. It is a lock working in both user mode and kernel mode, for e…
8 …sts a lock, the lock status is first checked in user space. If no lock contention occurs, the user…
10lock, the lock status is first checked in user space. If no other thread is blocked by the lock, t…
16lock contention or lock release in user space, the futex system call is invoked to pass the user-m…
20 …ntifies a user-mode lock. The nodes with the same key value added to a queue_list indicate a queue…
34 | Waking up a thread| OsFutexWake | Wakes up a thread that is blocked by a specified lock. …
35 | Modifying the lock address | OsFutexRequeue | Adjusts the position of a specified lock in the fu…
39 > The futex system call and user-mode logic form a user-mode lock. Therefore, you are advised to us…
/ohos5.0/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/jsview/models/
H A Dpatternlock_model_impl.cpp61 CHECK_NULL_VOID(lock); in SetPatternComplete()
68 CHECK_NULL_VOID(lock); in SetSelectedColor()
75 CHECK_NULL_VOID(lock); in SetAutoReset()
76 lock->SetAutoReset(isAutoReset); in SetAutoReset()
82 CHECK_NULL_VOID(lock); in SetPathColor()
83 lock->SetPathColor(pathColor); in SetPathColor()
89 CHECK_NULL_VOID(lock); in SetActiveColor()
96 CHECK_NULL_VOID(lock); in SetRegularColor()
103 CHECK_NULL_VOID(lock); in SetCircleRadius()
104 lock->SetCircleRadius(radius); in SetCircleRadius()
[all …]
/ohos5.0/docs/zh-cn/application-dev/reference/apis-basic-services-kit/
H A Djs-apis-runninglock.md88 console.info('created running lock: ' + lock);
133 console.info('created running lock: ' + lock);
228 console.info('created running lock: ' + lock);
265 console.info('created running lock: ' + lock);
313 console.info('create running lock: ' + lock);
359 console.info('create running lock: ' + lock);
408 console.info('create running lock: ' + lock);
425 lock(timeout: number): void
446 lock.lock(500);
447 console.info('create running lock and lock success');
[all …]
/ohos5.0/foundation/communication/wifi/wifi/services/wifi_standard/wifi_framework/wifi_manage/wifi_p2p/
H A Dwifi_p2p_group_info_proxy.cpp21 std::unique_lock<std::mutex> lock(proxyMutex); in operator ==() local
27 std::unique_lock<std::mutex> lock(proxyMutex); in operator !=() local
33 std::unique_lock<std::mutex> lock(proxyMutex); in SetIsGroupOwner() local
39 std::unique_lock<std::mutex> lock(proxyMutex); in IsGroupOwner() local
45 std::unique_lock<std::mutex> lock(proxyMutex); in SetOwner() local
51 std::unique_lock<std::mutex> lock(proxyMutex); in GetOwner() local
57 std::unique_lock<std::mutex> lock(proxyMutex); in SetPassphrase() local
63 std::unique_lock<std::mutex> lock(proxyMutex); in GetPassphrase() local
69 std::unique_lock<std::mutex> lock(proxyMutex); in SetInterface() local
75 std::unique_lock<std::mutex> lock(proxyMutex); in GetInterface() local
[all …]
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/benches/
H A Dylong_tokio_rwlock.rs52 let lock = Arc::new(RwLock::new(())); in tokio_rwlock_read() localVariable
56 let lock = lock.clone(); in tokio_rwlock_read() localVariable
81 let lock = lock.clone(); in ylong_rwlock_read() localVariable
105 let lock = lock.clone(); in tokio_rwlock_write() localVariable
130 let lock = lock.clone(); in ylong_rwlock_write() localVariable
153 let _lock_in = lock.clone(); in tokio_rwlock_write_read()
157 let lock_in = lock.clone(); in tokio_rwlock_write_read()
162 let lock_in = lock.clone(); in tokio_rwlock_write_read()
185 let _lock_in = lock.clone(); in ylong_rwlock_write_read()
189 let lock_in = lock.clone(); in ylong_rwlock_write_read()
[all …]
/ohos5.0/foundation/communication/wifi/wifi/frameworks/native/src/
H A Dwifi_p2p_impl.cpp78 std::lock_guard<std::mutex> lock(mutex_); in EnableP2p() local
85 std::lock_guard<std::mutex> lock(mutex_); in DisableP2p() local
92 std::lock_guard<std::mutex> lock(mutex_); in DiscoverDevices() local
99 std::lock_guard<std::mutex> lock(mutex_); in StopDiscoverDevices() local
106 std::lock_guard<std::mutex> lock(mutex_); in DiscoverServices() local
113 std::lock_guard<std::mutex> lock(mutex_); in StopDiscoverServices() local
120 std::lock_guard<std::mutex> lock(mutex_); in RequestService() local
127 std::lock_guard<std::mutex> lock(mutex_); in PutLocalP2pService() local
134 std::lock_guard<std::mutex> lock(mutex_); in DeleteLocalP2pService() local
141 std::lock_guard<std::mutex> lock(mutex_); in StartP2pListen() local
[all …]
H A Dwifi_device_impl.cpp124 std::lock_guard<std::mutex> lock(mutex_); in EnableWifi() local
131 std::lock_guard<std::mutex> lock(mutex_); in DisableWifi() local
138 std::lock_guard<std::mutex> lock(mutex_); in InitWifiProtect() local
145 std::lock_guard<std::mutex> lock(mutex_); in GetWifiProtectRef() local
152 std::lock_guard<std::mutex> lock(mutex_); in PutWifiProtectRef() local
159 std::lock_guard<std::mutex> lock(mutex_); in IsHeldWifiProtectRef() local
185 std::lock_guard<std::mutex> lock(mutex_); in RemoveCandidateConfig() local
192 std::lock_guard<std::mutex> lock(mutex_); in RemoveCandidateConfig() local
199 std::lock_guard<std::mutex> lock(mutex_); in AddDeviceConfig() local
206 std::lock_guard<std::mutex> lock(mutex_); in UpdateDeviceConfig() local
[all …]
/ohos5.0/base/startup/init/services/param/liteos/
H A Dparam_osadp.c146 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()
165 pthread_rwlock_rdlock(&lock->rwlock); in ParamRWMutexRDLock()
171 pthread_rwlock_unlock(&lock->rwlock); in ParamRWMutexUnlock()
256 uint32_t ret = LOS_MuxCreate(&lock->mutex); in ParamRWMutexCreate()
280 uint32_t ret = LOS_MuxPost(lock->mutex); in ParamRWMutexUnlock()
[all …]
/ohos5.0/drivers/hdf_core/framework/support/platform/src/mipi/
H A Dmipi_csi_core.c16 struct OsalMutex lock; member
40 (void)OsalMutexInit(&(cntlr->lock)); in MipiCsiRegisterCntlr()
63 (void)OsalMutexDestroy(&(cntlr->lock)); in MipiCsiUnregisterCntlr()
133 (void)OsalMutexLock(&(cntlr->lock)); in MipiCsiCntlrSetComboDevAttr()
160 (void)OsalMutexLock(&(cntlr->lock)); in MipiCsiCntlrSetPhyCmvmode()
191 (void)OsalMutexLock(&(cntlr->lock)); in MipiCsiCntlrSetExtDataType()
218 (void)OsalMutexLock(&(cntlr->lock)); in MipiCsiCntlrSetHsMode()
245 (void)OsalMutexLock(&(cntlr->lock)); in MipiCsiCntlrEnableClock()
272 (void)OsalMutexLock(&(cntlr->lock)); in MipiCsiCntlrDisableClock()
299 (void)OsalMutexLock(&(cntlr->lock)); in MipiCsiCntlrResetRx()
[all …]
H A Dmipi_dsi_core.c18 struct OsalMutex lock; member
42 (void)OsalMutexInit(&(cntlr->lock)); in MipiDsiRegisterCntlr()
65 (void)OsalMutexDestroy(&(cntlr->lock)); in MipiDsiUnregisterCntlr()
136 (void)OsalMutexLock(&(cntlr->lock)); in MipiDsiCntlrSetCfg()
159 (void)OsalMutexLock(&(cntlr->lock)); in MipiDsiCntlrGetCfg()
178 (void)OsalMutexLock(&(cntlr->lock)); in MipiDsiCntlrSetLpMode()
195 (void)OsalMutexLock(&(cntlr->lock)); in MipiDsiCntlrSetHsMode()
212 (void)OsalMutexLock(&(cntlr->lock)); in MipiDsiCntlrEnterUlps()
229 (void)OsalMutexLock(&(cntlr->lock)); in MipiDsiCntlrExitUlps()
252 (void)OsalMutexLock(&(cntlr->lock)); in MipiDsiCntlrTx()
[all …]
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/storage_multithread_test/src/
H A Dhks_storage_file_lock_test.cpp35 EXPECT_NE(lock, nullptr);
44 HksStorageFileLockRelease(lock);
54 if (lock != nullptr) {
55 locks.push_back(lock);
59 for (auto lock : locks) { variable
60 HksStorageFileLockRelease(lock);
70 if (lock != nullptr) {
71 locks.push_back(lock);
77 for (auto lock : locks) { variable
78 EXPECT_EQ(first, lock);
[all …]
/ohos5.0/base/inputmethod/imf/test/common/src/
H A Dtext_listener.cpp55 std::unique_lock<std::mutex> lock(textListenerCallbackLock_); in InsertText() local
63 std::unique_lock<std::mutex> lock(textListenerCallbackLock_); in DeleteForward() local
71 std::unique_lock<std::mutex> lock(textListenerCallbackLock_); in DeleteBackward() local
83 std::unique_lock<std::mutex> lock(textListenerCallbackLock_); in SendKeyboardStatus() local
91 std::unique_lock<std::mutex> lock(textListenerCallbackLock_); in SendFunctionKey() local
106 std::unique_lock<std::mutex> lock(textListenerCallbackLock_); in MoveCursor() local
114 std::unique_lock<std::mutex> lock(textListenerCallbackLock_); in HandleSetSelection() local
123 std::unique_lock<std::mutex> lock(textListenerCallbackLock_); in HandleExtendAction() local
131 std::unique_lock<std::mutex> lock(textListenerCallbackLock_); in HandleSelect() local
163 std::unique_lock<std::mutex> lock(textListenerCallbackLock_); in NotifyPanelStatusInfo() local
[all …]
/ohos5.0/foundation/communication/dsoftbus/core/bus_center/lnn/net_ledger/distributed_ledger/src/
H A Dlnn_distributed_net_ledger_manager.c313 SoftBusMutexUnlock(&(LnnGetDistributedNetLedger()->lock)); in LnnUpdateNodeBleMac()
352 SoftBusMutexUnlock(&LnnGetDistributedNetLedger()->lock); in LnnSetRemoteScreenStatusInfo()
830 SoftBusMutexUnlock(&(LnnGetDistributedNetLedger()->lock)); in LnnSetDLDeviceInfoName()
833 SoftBusMutexUnlock(&(LnnGetDistributedNetLedger()->lock)); in LnnSetDLDeviceInfoName()
890 SoftBusMutexUnlock(&(LnnGetDistributedNetLedger()->lock)); in LnnSetDLUnifiedDeviceName()
893 SoftBusMutexUnlock(&(LnnGetDistributedNetLedger()->lock)); in LnnSetDLUnifiedDeviceName()
924 SoftBusMutexUnlock(&(LnnGetDistributedNetLedger()->lock)); in LnnSetDLUnifiedDefaultDeviceName()
927 SoftBusMutexUnlock(&(LnnGetDistributedNetLedger()->lock)); in LnnSetDLUnifiedDefaultDeviceName()
958 SoftBusMutexUnlock(&(LnnGetDistributedNetLedger()->lock)); in LnnSetDLDeviceNickNameByUdid()
961 SoftBusMutexUnlock(&(LnnGetDistributedNetLedger()->lock)); in LnnSetDLDeviceNickNameByUdid()
[all …]
/ohos5.0/foundation/multimedia/camera_framework/frameworks/native/camera/src/output/
H A Dcapture_output.cpp40 std::lock_guard<std::mutex> lock(deathRecipientMutex_); in RegisterStreamBinderDied() local
101 std::lock_guard<std::mutex> lock(streamMutex_); in IsStreamCreated() local
107 std::lock_guard<std::mutex> lock(streamMutex_); in GetStream() local
114 std::lock_guard<std::mutex> lock(streamMutex_); in SetStream() local
122 std::lock_guard<std::mutex> lock(sessionMutex_); in GetSession() local
128 std::lock_guard<std::mutex> lock(sessionMutex_); in SetSession() local
136 std::lock_guard<std::mutex> lock(streamMutex_); in Release() local
145 std::lock_guard<std::mutex> lock(photoProfileMutex_); in SetPhotoProfile() local
209 std::lock_guard<std::mutex> lock(tagsMutex_); in AddTag() local
215 std::lock_guard<std::mutex> lock(tagsMutex_); in RemoveTag() local
[all …]
/ohos5.0/foundation/multimedia/camera_framework/services/deferred_processing_service/include/base/
H A Dblocking_queue.h39 std::unique_lock<std::mutex> lock(mutex_); in Size()
44 std::unique_lock<std::mutex> lock(mutex_); in Full()
53 std::unique_lock<std::mutex> lock(mutex_); in Empty()
58 std::unique_lock<std::mutex> lock(mutex_); in Push()
59 auto ret = CanPush(lock); in Push()
68 std::unique_lock<std::mutex> lock(mutex_); in Push()
69 auto ret = CanPush(lock, timeoutMs); in Push()
78 std::unique_lock<std::mutex> lock(mutex_); in Push()
79 auto ret = CanPush(lock, timeoutMs); in Push()
88 std::unique_lock<std::mutex> lock(mutex_); in Pop()
[all …]
/ohos5.0/foundation/multimedia/player_framework/services/services/recorder/client/
H A Drecorder_client.cpp72 std::lock_guard<std::mutex> lock(mutex_); in CreateListenerObject() local
87 std::lock_guard<std::mutex> lock(mutex_); in SetVideoSource() local
96 std::lock_guard<std::mutex> lock(mutex_); in SetVideoEncoder() local
105 std::lock_guard<std::mutex> lock(mutex_); in SetVideoSize() local
114 std::lock_guard<std::mutex> lock(mutex_); in SetVideoFrameRate() local
123 std::lock_guard<std::mutex> lock(mutex_); in SetVideoEncodingBitRate() local
132 std::lock_guard<std::mutex> lock(mutex_); in SetVideoIsHdr() local
141 std::lock_guard<std::mutex> lock(mutex_); in SetVideoEnableTemporalScale() local
151 std::lock_guard<std::mutex> lock(mutex_); in SetMetaSource() local
161 std::lock_guard<std::mutex> lock(mutex_); in SetMetaConfigs() local
[all …]
/ohos5.0/foundation/communication/dsoftbus/core/transmission/trans_channel/udp_negotiation/src/
H A Dtrans_udp_channel_manager.c53 (void)SoftBusMutexUnlock(&g_udpChannelMgr->lock); in ReleaseUdpChannelLock()
106 (void)SoftBusMutexUnlock(&g_udpChannelMgr->lock); in TransUdpTimerProc()
151 (void)SoftBusMutexUnlock(&g_udpChannelMgr->lock); in TransUdpChannelMgrDeinit()
189 (void)SoftBusMutexUnlock(&(g_udpChannelMgr->lock)); in TransAddUdpChannel()
223 (void)SoftBusMutexUnlock(&(g_udpChannelMgr->lock)); in TransDelUdpChannel()
271 (void)SoftBusMutexUnlock(&g_udpChannelMgr->lock); in TransCloseUdpChannelByNetWorkId()
305 (void)SoftBusMutexUnlock(&(g_udpChannelMgr->lock)); in TransGetUdpChannelBySeq()
339 (void)SoftBusMutexUnlock(&(g_udpChannelMgr->lock)); in TransGetUdpChannelById()
373 (void)SoftBusMutexUnlock(&(g_udpChannelMgr->lock)); in TransUdpGetNameByChanId()
398 (void)SoftBusMutexUnlock(&(g_udpChannelMgr->lock)); in TransSetUdpChannelStatus()
[all …]
/ohos5.0/base/startup/init/services/param/linux/
H A Dparam_osadp.c27 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()
52 pthread_rwlock_unlock(&lock->rwlock); in ParamRWMutexUnlock()
[all …]

12345678910>>...139