/ohos5.0/foundation/multimedia/audio_framework/services/audio_service/common/src/ |
H A D | audio_thread_task.cpp | 43 if (state_.load() == RunningState::STOPPING) { in Start() 46 if (state_.load() == RunningState::STOPPED) { in Start() 67 if (state_.load() != RunningState::STOPPED) { in Stop() 82 return state_.load() == RunningState::STARTED; in CheckThreadIsRunning() 88 if (state_.load() != RunningState::STOPPING && state_.load() != RunningState::STOPPED) { in StopAsync() 97 switch (state_.load()) { in Pause() 101 … return state_.load() == RunningState::PAUSED || state_.load() == RunningState::STOPPED; in Pause() 121 if (state_.load() == RunningState::STARTED) { in PauseAsync() 137 if (state_.load() == RunningState::STARTED) { in RunJob() 141 if (state_.load() == RunningState::PAUSING || state_.load() == RunningState::PAUSED) { in RunJob() [all …]
|
/ohos5.0/foundation/multimedia/av_codec/services/utils/ |
H A D | task_thread.cpp | 53 if (runningState_.load() == RunningState::STOPPING) { in Start() 56 if (runningState_.load() == RunningState::STOPPED) { in Start() 78 if (runningState_.load() != RunningState::STOPPED) { in Stop() 96 …if (runningState_.load() != RunningState::STOPPING && runningState_.load() != RunningState::STOPPE… in StopAsync() 106 switch (runningState_.load()) { in Pause() 110 …return runningState_.load() == RunningState::PAUSED || runningState_.load() == RunningState::STOPP… in Pause() 132 if (runningState_.load() == RunningState::STARTED) { in PauseAsync() 157 name_.data(), runningState_.load()); in Run() 158 if (runningState_.load() == RunningState::STARTED) { in Run() 162 …if (runningState_.load() == RunningState::PAUSING || runningState_.load() == RunningState::PAUSED)… in Run() [all …]
|
/ohos5.0/foundation/multimedia/media_foundation/engine/foundation/osal/thread/ |
H A D | task.cpp | 66 name_.c_str(), runningState_.load()); in Stop() 68 if (runningState_.load() != RunningState::STOPPED) { in Stop() 71 syncCond_.Wait(lock, [this] { return runningState_.load() == RunningState::STOPPED; }); in Stop() 83 if (runningState_.load() != RunningState::STOPPED) { in StopAsync() 91 RunningState state = runningState_.load(); in Pause() 97 …return runningState_.load() == RunningState::PAUSED || runningState_.load() == RunningState::STOPP… in Pause() 119 if (runningState_.load() == RunningState::STARTED) { in PauseAsync() 139 name_.c_str(), runningState_.load()); in Run() 140 if (runningState_.load() == RunningState::STARTED) { in Run() 144 …if (runningState_.load() == RunningState::PAUSING || runningState_.load() == RunningState::PAUSED)… in Run() [all …]
|
/ohos5.0/foundation/multimedia/media_foundation/src/osal/task/ffrt/ |
H A D | task.cpp | 83 name_.c_str(), runningState_.load()); in Stop() 85 if (runningState_.load() != RunningState::STOPPED) { in Stop() 88 syncCond_.Wait(lock, [this] { return runningState_.load() == RunningState::STOPPED; }); in Stop() 103 if (runningState_.load() != RunningState::STOPPED) { in StopAsync() 111 RunningState state = runningState_.load(); in Pause() 117 …return runningState_.load() == RunningState::PAUSED || runningState_.load() == RunningState::STOPP… in Pause() 139 if (runningState_.load() == RunningState::STARTED) { in PauseAsync() 159 name_.c_str(), runningState_.load()); in Run() 160 if (runningState_.load() == RunningState::STARTED) { in Run() 164 …if (runningState_.load() == RunningState::PAUSING || runningState_.load() == RunningState::PAUSED)… in Run() [all …]
|
/ohos5.0/foundation/multimedia/av_codec/services/services/codec/server/post_processing/ |
H A D | lock_free_queue.h | 71 if (!active_.load()) { in PushWait() 80 currentTail = tail_.load(); in PushWait() 83 if (newTail == head_.load()) { in PushWait() 85 … canPushCv_.wait(lock, [&newTail, this]() { return newTail != head_.load() || !active_.load(); }); in PushWait() 88 if (!active_.load()) { in PushWait() 104 if (!active_.load()) { in PopWait() 114 currentHead = head_.load(); in PopWait() 119 …pCv_.wait(lock, [¤tHead, this]() { return currentHead != tail_.load() || !active_.load(); }); in PopWait() 122 if (!active_.load()) { in PopWait() 137 return head_.load() == tail_.load(); in Empty() [all …]
|
/ohos5.0/foundation/multimedia/media_foundation/src/osal/task/pthread/ |
H A D | taskInner.cpp | 138 if (runningState_.load() == RunningState::STOPPED) { in Stop() 160 if (runningState_.load() != RunningState::STOPPED) { in StopAsync() 171 RunningState state = runningState_.load(); in Pause() 173 MEDIA_LOG_I_FALSE_D_T(isStateLogEnabled_.load(), in Pause() 179 MEDIA_LOG_I_FALSE_D_T(isStateLogEnabled_.load(), in Pause() 188 RunningState state = runningState_.load(); in Pause() 202 RunningState state = runningState_.load(); in PauseAsync() 204 MEDIA_LOG_I_FALSE_D_T(isStateLogEnabled_.load(), in PauseAsync() 210 MEDIA_LOG_I_FALSE_D_T(isStateLogEnabled_.load(), in PauseAsync() 219 if (runningState_.load() == RunningState::STARTED) { in PauseAsync() [all …]
|
/ohos5.0/foundation/resourceschedule/ffrt/src/util/ |
H A D | spmc_queue.cpp | 47 return tail_.load() - head_.load(); in GetLength() 62 unsigned int head = head_.load(); in PopHead() 63 unsigned int tail = tail_.load(); in PopHead() 81 unsigned int head = head_.load(); in PushTail() 82 unsigned int tail = tail_.load(); in PushTail() 99 while ((dstQueue.GetLength() < dstQueue.GetCapacity()) && (head_.load() != tail_.load())) { in PopHeadToAnotherQueue()
|
/ohos5.0/docs/en/application-dev/reference/apis-basic-services-kit/ |
H A D | js-apis-resourceschedule-systemload.md | 3 …** module allows the system to determine the system load level based on the current temperature, l… 44 console.log(`system load changed, current level ` + res); 83 console.log(`system load changed, current level ` + res); 98 Obtains the system load level. This API uses a promise to return the result. 106 | Promise<[SystemLoadLevel](#systemloadlevel)> | Promise used to return the system load level… 123 Enumerates system load levels. 129 | LOW | 0 | The device temperature and load are low. | 130 …| The device temperature and load are normal but are approaching the medium range. You need to dow… 131 … or more device temperature or load items are slightly high, or the device temperature is in the m… 132 …e device temperature and load are relatively high. You need to stop all imperceptible services and… [all …]
|
/ohos5.0/foundation/graphic/graphic_surface/utils/frame_report/test/unittest/ |
H A D | frame_report_test.cpp | 63 ASSERT_TRUE(Rosen::FrameReport::GetInstance().activelyPid_.load() == FR_DEFAULT_PID); 68 ASSERT_TRUE(Rosen::FrameReport::GetInstance().activelyPid_.load() == FRT_GAME_PID); 71 ASSERT_TRUE(Rosen::FrameReport::GetInstance().activelyPid_.load() == FR_DEFAULT_PID); 74 ASSERT_TRUE(Rosen::FrameReport::GetInstance().activelyPid_.load() == FR_DEFAULT_PID); 155 … ASSERT_TRUE(Rosen::FrameReport::GetInstance().dequeueBufferTime_.load() == FRT_GAME_BUFFER_TIME); 173 ASSERT_TRUE(Rosen::FrameReport::GetInstance().queueBufferTime_.load() == FRT_GAME_BUFFER_TIME); 176 ASSERT_TRUE(Rosen::FrameReport::GetInstance().queueBufferTime_.load() == FRT_GAME_BUFFER_TIME); 190 ASSERT_TRUE(Rosen::FrameReport::GetInstance().pendingBufferNum_.load() == FRT_GAME_BUFFER_TIME); 193 ASSERT_TRUE(Rosen::FrameReport::GetInstance().pendingBufferNum_.load() == FRT_GAME_BUFFER_TIME); 207 ASSERT_TRUE(Rosen::FrameReport::GetInstance().pendingBufferNum_.load() == FRT_GAME_BUFFER_TIME); [all …]
|
/ohos5.0/foundation/resourceschedule/ffrt/src/sched/ |
H A D | interval.cpp | 70 void PerfCtrl::Update(uint64_t deadlineNs, uint64_t load, bool force) in Update() argument 75 predUtil = (load << SCHED_CAPACITY_SHIFT) / deadlineNs; in Update() 81 FFRT_LOGI("Update Load %lu, Deadline %lu, Util %lu\n", load, deadlineNs, predUtil); in Update() 86 void IntervalLoadPredictor::UpdateTotalLoad(uint64_t load) in UpdateTotalLoad() argument 88 totalLoad.UpdateLoad(load); in UpdateTotalLoad() 91 void IntervalLoadPredictor::UpdateCPLoad(uint64_t load) in UpdateCPLoad() argument 97 cpLoad[cpLoadIndex++].UpdateLoad(load); in UpdateCPLoad() 107 uint64_t load = cpLoad[cpLoadIndex].GetPredictLoad(); in GetCPLoad() local 108 if (load == 0) { in GetCPLoad() 113 return (predictLoad < load) ? 0 : (predictLoad - load); in GetCPLoad()
|
/ohos5.0/foundation/distributedhardware/distributed_audio/services/audiohdiproxy/src/ |
H A D | daudio_hdf_operate.cpp | 40 if (audioServStatus_.load() == OHOS::HDI::ServiceManager::V1_0::SERVIE_STATUS_START && in LoadDaudioHDFImpl() 41 audioextServStatus_.load() == OHOS::HDI::ServiceManager::V1_0::SERVIE_STATUS_START) { in LoadDaudioHDFImpl() 95 …D("WaitLoadService start service %s, status %hu", servName.c_str(), this->audioServStatus_.load()); in WaitLoadService() 97 … return (this->audioServStatus_.load() == OHOS::HDI::ServiceManager::V1_0::SERVIE_STATUS_START); in WaitLoadService() 100 if (this->audioServStatus_.load() != OHOS::HDI::ServiceManager::V1_0::SERVIE_STATUS_START) { in WaitLoadService() 102 this->audioServStatus_.load()); in WaitLoadService() 108 …WaitLoadService start service %s, status %hu", servName.c_str(), this->audioextServStatus_.load()); in WaitLoadService() 110 … return (this->audioextServStatus_.load() == OHOS::HDI::ServiceManager::V1_0::SERVIE_STATUS_START); in WaitLoadService() 113 … if (this->audioextServStatus_.load() != OHOS::HDI::ServiceManager::V1_0::SERVIE_STATUS_START) { in WaitLoadService() 115 this->audioextServStatus_.load()); in WaitLoadService()
|
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/sync/mpsc/unbounded/ |
H A D | queue.rs | 137 let next_block = block.next.load(Acquire); in send_inner() 151 let mut tail = self.tail.index.load(Acquire); in send() 152 let mut block_ptr = self.tail.block.load(Acquire); in send() 160 tail = self.tail.index.load(Acquire); in send() 161 block_ptr = self.tail.block.load(Acquire); in send() 178 tail = self.tail.index.load(Acquire); in send() 179 block_ptr = self.tail.block.load(Acquire); in send() 210 let tail_index = self.tail.index.load(Acquire); in try_recv() 243 self.tail.index.load(Acquire) & CLOSED == CLOSED in is_close() 248 let mut tail = self.tail.index.load(Acquire) >> INDEX_SHIFT; in len() [all …]
|
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/sync/ |
H A D | watch.rs | 109 if self.channel.rx_cnt.load(Acquire) == 0 { in send() 142 let (value_version, _) = self.channel.state.load(); in subscribe() 166 self.channel.rx_cnt.load(Acquire) in receiver_count() 436 let (value_version, _) = self.channel.state.load(); in borrow() 474 let (value_version, _) = self.channel.state.load(); in borrow_notify() 524 fn load(&self) -> (usize, bool) { in load() method 525 let state = self.0.load(Acquire); in load() 655 assert_eq!(tx.channel.rx_cnt.load(Acquire), 1); in receiver_count() 657 assert_eq!(tx.channel.rx_cnt.load(Acquire), 2); in receiver_count() 659 assert_eq!(tx.channel.rx_cnt.load(Acquire), 3); in receiver_count() [all …]
|
/ohos5.0/base/powermgr/display_manager/brightness_manager/src/ |
H A D | brightness_dimming.cpp | 75 mCurrentBrightness = mFromBrightness.load(); in StartDimming() 147 mCurrentBrightness = mToBrightness.load(); in NextStep() 153 mCurrentBrightness.load(), nextBrightness); in NextStep() 161 mCurrentBrightness.load(), mToBrightness.load()); in NextStep() 162 mCurrentBrightness = mToBrightness.load(); in NextStep() 168 mCurrentStep.load(), mCurrentBrightness.load(), mStride.load()); in NextStep()
|
/ohos5.0/foundation/multimedia/media_library/frameworks/innerkitsimpl/medialibrary_data_extension/src/ |
H A D | medialibrary_restore.cpp | 89 CHECK_AND_RETURN_LOG((isBackuping_.load()), "StopCloudSync: backuping is false, return"); in StopCloudSync() 118 CHECK_AND_RETURN_LOG((!isBackuping_.load()), "CheckBackup: is backuping, return"); in CheckBackup() 140 CHECK_AND_RETURN_LOG((!isWaiting_.load()), "waiting stop cloudsync"); in DoRdbBackup() 146 … MEDIA_INFO_LOG("DoRdbBackup: Call CloudSync start [isBackuping=%{public}d]", isBackuping_.load()); in DoRdbBackup() 151 if (!isBackuping_.load()) { in DoRdbBackup() 168 if (isInterrupting_.load() || !isBackuping_.load()) { in DoRdbBackup() 192 if (!isBackuping_.load()) { in InterruptBackup() 196 if (isWaiting_.load()) { in InterruptBackup()
|
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/util/ |
H A D | slab.rs | 217 if !self.pages[page_idx].allocated.load(SeqCst) { in get() 259 if page.used.load(Relaxed) != 0 || !page.allocated.load(Relaxed) { in compact() 330 if me.used.load(Relaxed) == me.len { in allocate() 591 assert!(!slab.pages[1].allocated.load(SeqCst)); in ut_slab_compact() 597 assert!(slab.pages[1].allocated.load(SeqCst)); in ut_slab_compact() 598 assert_eq!(slab.pages[1].used.load(SeqCst), 1); in ut_slab_compact() 600 assert!(slab.pages[1].allocated.load(SeqCst)); in ut_slab_compact() 601 assert_eq!(slab.pages[1].used.load(SeqCst), 0); in ut_slab_compact() 682 assert_eq!(i, v.id.load(SeqCst)); in ut_slab_insert_many() 695 assert_eq!(10_000 - i, v.id.load(SeqCst)); in ut_slab_insert_many() [all …]
|
/ohos5.0/foundation/distributedhardware/distributed_camera/services/cameraservice/sourceservice/src/distributedcameramgr/dcamerahdf/ |
H A D | dcamera_hdf_operate.cpp | 39 if (cameraServStatus_.load() == OHOS::HDI::ServiceManager::V1_0::SERVIE_STATUS_START && in LoadDcameraHDFImpl() 40 providerServStatus_.load() == OHOS::HDI::ServiceManager::V1_0::SERVIE_STATUS_START) { in LoadDcameraHDFImpl() 98 … return (this->cameraServStatus_.load() == OHOS::HDI::ServiceManager::V1_0::SERVIE_STATUS_START); in WaitLoadCameraService() 101 if (cameraServStatus_.load() != OHOS::HDI::ServiceManager::V1_0::SERVIE_STATUS_START) { in WaitLoadCameraService() 102 DHLOGE("wait load cameraService failed, status %{public}d", cameraServStatus_.load()); in WaitLoadCameraService() 114 … return (this->providerServStatus_.load() == OHOS::HDI::ServiceManager::V1_0::SERVIE_STATUS_START); in WaitLoadProviderService() 117 if (providerServStatus_.load() != OHOS::HDI::ServiceManager::V1_0::SERVIE_STATUS_START) { in WaitLoadProviderService() 118 DHLOGE("wait load providerService failed, status %{public}d", providerServStatus_.load()); in WaitLoadProviderService()
|
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/task/ |
H A D | state.rs | 116 self.0.load(Acquire) in get_current_state() 342 assert_eq!(task_state.0.load(Acquire), INIT); in ut_task_state_new() 446 let mut next_state = task_state.0.load(Acquire); in ut_task_state_turning_to_idle() 462 let mut next_state = task_state.0.load(Acquire); in ut_task_state_turning_to_idle() 474 let mut next_state = task_state.0.load(Acquire); in ut_task_state_turning_to_idle() 491 let mut test_state = task_state.0.load(Acquire); in ut_task_state_turning_to_scheduling() 509 let mut next_state = task_state.0.load(Acquire); in ut_task_state_turn_to_un_set_waker() 516 let mut next_state = task_state.0.load(Acquire); in ut_task_state_turn_to_un_set_waker() 524 let mut next_state = task_state.0.load(Acquire); in ut_task_state_turn_to_un_set_waker() 545 let mut next_state = task_state.0.load(Acquire); in ut_task_state_turn_to_set_waker() [all …]
|
/ohos5.0/foundation/communication/netstack/frameworks/cj/http/src/ |
H A D | net_http_cache_proxy.cpp | 52 if (!cj_cacheIsRunning.load()) { in ReadResponseFromCache() 92 if (!cj_cacheIsRunning.load()) { in WriteResponseToCache() 117 if (cj_cacheIsRunning.load()) { in RunCacheWithSize() 128 while (cj_cacheNeedRun.load()) { in RunCacheWithSize() 131 [] { return !cj_cacheNeedRun.load(); }); in RunCacheWithSize() 143 if (!cj_cacheIsRunning.load()) { in FlushCache() 151 if (!cj_cacheIsRunning.load()) { in StopCacheAndDelete() 158 cj_cacheThreadCondition.wait(lock, [] { return !cj_cacheIsRunning.load(); }); in StopCacheAndDelete()
|
/ohos5.0/base/notification/distributed_notification_service/frameworks/ans/src/ |
H A D | notification_subscriber.cpp | 119 if (isSubscriberDestory_.load()) { in OnConnected() 133 if (isSubscriberDestory_.load()) { in OnDisconnected() 148 if (isSubscriberDestory_.load()) { in OnConsumed() 165 if (isSubscriberDestory_.load()) { in OnConsumedList() 177 if (isSubscriberDestory_.load()) { in OnCanceled() 193 if (isSubscriberDestory_.load()) { in OnBatchCanceled() 212 if (isSubscriberDestory_.load()) { in OnCanceledList() 227 if (isSubscriberDestory_.load()) { in OnUpdated() 235 if (isSubscriberDestory_.load()) { in OnDoNotDisturbDateChange() 244 if (isSubscriberDestory_.load()) { in OnEnabledNotificationChanged() [all …]
|
/ohos5.0/foundation/multimedia/av_codec/test/moduletest/audio_encoder/Common/src/ |
H A D | AudioEncoderDemoCommon.cpp | 127 if (!isRunning_.load()) { in NativeStart() 215 while (isRunning_.load()) { in updateInputData() 241 while (isRunning_.load()) { in updateOutputData() 336 while (isRunning_.load()) { in NativeInputFunc() 424 while (isRunning_.load()) { in NativeOutputFunc() 547 while (isRunning_.load()) { in NativeRunCase() 597 while (isRunning_.load()) { in NativeRunCaseWithoutCreate() 629 while (isRunning_.load()) { in NativeRunCasePerformance() 654 while (isRunning_.load()) { in NativeRunCaseFlush() 672 while (isRunning_.load()) { in NativeRunCaseFlush() [all …]
|
/ohos5.0/foundation/multimedia/camera_framework/services/deferred_processing_service/src/event_monitor/ |
H A D | events_monitor.cpp | 45 DP_CHECK_RETURN(initialized_.load()); in Initialize() 69 DP_CHECK_ERROR_RETURN_LOG(!initialized_.load(), "uninitialized events monitor!"); in NotifyThermalLevel() 82 DP_CHECK_ERROR_RETURN_LOG(!initialized_.load(), "uninitialized events monitor!"); in NotifyCameraSessionStatus() 106 DP_CHECK_ERROR_RETURN_LOG(!initialized_.load(), "uninitialized events monitor!"); in NotifyMediaLibraryStatus() 117 DP_CHECK_ERROR_RETURN_LOG(!initialized_.load(), "uninitialized events monitor!"); in NotifyImageEnhanceStatus() 128 DP_CHECK_ERROR_RETURN_LOG(!initialized_.load(), "uninitialized events monitor!"); in NotifyScreenStatus() 139 DP_CHECK_ERROR_RETURN_LOG(!initialized_.load(), "uninitialized events monitor!"); in NotifyChargingStatus() 150 DP_CHECK_ERROR_RETURN_LOG(!initialized_.load(), "uninitialized events monitor!"); in NotifyBatteryStatus() 161 DP_CHECK_ERROR_RETURN_LOG(!initialized_.load(), "uninitialized events monitor!"); in NotifyBatteryLevel() 172 DP_CHECK_ERROR_RETURN_LOG(!initialized_.load(), "uninitialized events monitor!"); in NotifySystemPressureLevel() [all …]
|
/ohos5.0/docs/en/application-dev/napi/ |
H A D | use-napi-load-module.md | 5 …load a module in the main thread. After the module is loaded, you can use **napi_get_property** to… 21 | path | Path of the file or name of the module to load. | 28 - Do not load a file in the callback function of a thread-safe function. 30 You are advised to use [napi_load_module_with_info](use-napi-load-module-with-info.md) to load modu… 34 Use **napi_load_module** to load the system module @ohos.hilog and call the **info** function. 38 // 1. Call napi_load_module to load the @ohos.hilog module. 93 2. Call **napi_load_module** to load the module from the **Test.ets** file, call the **test()** fun… 98 // 1. Call napi_load_module to load the module from the Test.ets file.
|
/ohos5.0/foundation/resourceschedule/resource_schedule_service/cgroup_sched/test/unittest/ |
H A D | cgroup_sched_test.cpp | 176 …ol isReportContinuousStartup = AppStartupSceneRec::GetInstance().isReportContinuousStartup_.load(); 181 isReportContinuousStartup = AppStartupSceneRec::GetInstance().isReportContinuousStartup_.load(); 186 isReportContinuousStartup = AppStartupSceneRec::GetInstance().isReportContinuousStartup_.load(); 191 isReportContinuousStartup = AppStartupSceneRec::GetInstance().isReportContinuousStartup_.load(); 196 isReportContinuousStartup = AppStartupSceneRec::GetInstance().isReportContinuousStartup_.load(); 199 isReportContinuousStartup = AppStartupSceneRec::GetInstance().isReportContinuousStartup_.load(); 204 isReportContinuousStartup = AppStartupSceneRec::GetInstance().isReportContinuousStartup_.load(); 218 …ol isReportContinuousStartup = AppStartupSceneRec::GetInstance().isReportContinuousStartup_.load(); 227 isReportContinuousStartup = AppStartupSceneRec::GetInstance().isReportContinuousStartup_.load(); 230 isReportContinuousStartup = AppStartupSceneRec::GetInstance().isReportContinuousStartup_.load();
|
/ohos5.0/foundation/communication/netstack/frameworks/js/napi/http/cache/cache_proxy/src/ |
H A D | cache_proxy.cpp | 59 if (!g_cacheIsRunning.load()) { in ReadResponseFromCache() 99 if (!g_cacheIsRunning.load()) { in WriteResponseToCache() 124 if (g_cacheIsRunning.load()) { in RunCacheWithSize() 135 while (g_cacheNeedRun.load()) { in RunCacheWithSize() 138 [] { return !g_cacheNeedRun.load(); }); in RunCacheWithSize() 150 if (!g_cacheIsRunning.load()) { in FlushCache() 158 if (!g_cacheIsRunning.load()) { in StopCacheAndDelete() 165 g_cacheThreadCondition.wait(lock, [] { return !g_cacheIsRunning.load(); }); in StopCacheAndDelete()
|