點(diǎn)擊藍(lán)字 ╳ 關(guān)注我們
戴學(xué)躍
深圳市優(yōu)博終端科技有限公司
OpenHarmony知識(shí)體系工作組
簡(jiǎn)介
效果展示
開發(fā)環(huán)境
四步帶你體驗(yàn)OpenHarmony標(biāo)準(zhǔn)系統(tǒng)開機(jī)時(shí)長(zhǎng)優(yōu)化
void thread_func(void* handle){
// 空函數(shù)
}
int main(){
std::vector<std::string> lib_names = {"mpp1.so", "mpp2.so", "mpp3.so"};
std::vector<void*> handles;
for (const auto& lib_name : lib_names) {
void* handle = dlopen(lib_name.c_str(), RTLD_LAZY);
if (handle == nullptr) {
std::cerr << "Error loading library " << lib_name << ": " << dlerror() << std::endl;
return 1;
}
handles.push_back(handle);
}
std::vector<std::thread> threads;
for (const auto& handle : handles) {
threads.emplace_back(thread_func, handle);
}
for (auto& thread : threads) {
thread.join();
}
for (const auto& handle : handles) {
dlclose(handle);
}
return 0;
}
"services" : [{
"name" : "render_service",
"path" : ["/system/bin/render_service"],
"uid" : "root",
"importance" : -20,
"gid" : ["system", "shell", "uhid", "root"]
}, {
"name" : "bootanimation",
"path" : ["/system/bin/bootanimation"],
"once" : 1,
"importance" : -20,
"uid" : "root",
"gid" : ["system", "shell", "uhid", "root"]
}
]
ReadZipFile(BOOT_PIC_ZIP, imageVector_, jsonConfig);
imgVecSize_ = static_cast<int32_t>(imageVector_.size());
if (imgVecSize_ <= 0) {
PostTask(std::bind(&AppExecFwk::Stop, runner_));
LOGE("zip pic num is 0.");
return;
}
SortZipFile(imageVector_);
OHOS::FrameCallback fcb = {
.userData_ = this,
.callback_ = std::bind(&BootAnimation::onVsync, this),
};
int32_t changefreq = static_cast<int32_t>((1000.0 / freq_) / 16);
ret=receiver_->SetVSyncRate(fcb,changefreq);

總結(jié)
原文標(biāo)題:OpenHarmony標(biāo)準(zhǔn)系統(tǒng)開機(jī)時(shí)長(zhǎng)優(yōu)化
文章出處:【微信公眾號(hào):OpenAtom OpenHarmony】歡迎添加關(guān)注!文章轉(zhuǎn)載請(qǐng)注明出處。
-
鴻蒙
+關(guān)注
關(guān)注
59文章
2526瀏覽量
43787 -
OpenHarmony
+關(guān)注
關(guān)注
27文章
3835瀏覽量
18171
原文標(biāo)題:OpenHarmony標(biāo)準(zhǔn)系統(tǒng)開機(jī)時(shí)長(zhǎng)優(yōu)化
文章出處:【微信號(hào):gh_e4f28cfa3159,微信公眾號(hào):OpenAtom OpenHarmony】歡迎添加關(guān)注!文章轉(zhuǎn)載請(qǐng)注明出處。
發(fā)布評(píng)論請(qǐng)先 登錄
基于OpenHarmony標(biāo)準(zhǔn)系統(tǒng)的C++公共基礎(chǔ)類庫(kù)案例:ThreadPoll

基于OpenHarmony標(biāo)準(zhǔn)系統(tǒng)的C++公共基礎(chǔ)類庫(kù)案例:Semaphore

AM574x延長(zhǎng)開機(jī)時(shí)間(POH)

基于ArkTS語言的OpenHarmony APP應(yīng)用開發(fā):HelloOpenharmony

AM62x延長(zhǎng)開機(jī)時(shí)間應(yīng)用說明

瑞芯微RK3566鴻蒙開發(fā)板OpenHarmony標(biāo)準(zhǔn)系統(tǒng)應(yīng)用兼容性測(cè)試指導(dǎo)

基于OpenHarmony標(biāo)準(zhǔn)系統(tǒng)的C++公共基礎(chǔ)類庫(kù)案例:SafeMap

基于OpenHarmony標(biāo)準(zhǔn)系統(tǒng)的C++公共基礎(chǔ)類庫(kù)案例:SafeStack

基于OpenHarmony標(biāo)準(zhǔn)系統(tǒng)的C++公共基礎(chǔ)類庫(kù)案例:SafeBlockQueue

基于OpenHarmony標(biāo)準(zhǔn)系統(tǒng)的C++公共基礎(chǔ)類庫(kù)案例:SafeStack
基于OpenHarmony標(biāo)準(zhǔn)系統(tǒng)的C++公共基礎(chǔ)類庫(kù)案例:SafeQueue
請(qǐng)求推薦無需NPU的OpenHarmony標(biāo)準(zhǔn)系統(tǒng)ARM開發(fā)板
OpenHarmony標(biāo)準(zhǔn)系統(tǒng)C++公共基礎(chǔ)類庫(kù)案例:HelloWorld

評(píng)論