ffrt接口适配代码回退

Signed-off-by: baishimin <2258359443@qq.com>
This commit is contained in:
baishimin 2024-11-04 14:54:50 +08:00
parent 364ddf7f57
commit f4495b550b

View File

@ -15,8 +15,6 @@
#include "session_manager/include/scene_session_manager.h"
#include <securec.h>
#include <ability_context.h>
#include <ability_manager_client.h>
#include <bundlemgr/launcher_service.h>
@ -165,16 +163,6 @@ bool GetSingleIntItem(const WindowSceneConfig::ConfigItem& item, int32_t& value)
return false;
}
int ConfigFfrtWorkerNum()
{
ffrt_worker_num_param qosConfig;
(void)memset_s(&qosConfig, sizeof(qosConfig), -1, sizeof(qosConfig));
qosConfig.effectLen = 1;
qosConfig.qosConfigArray[0].qos = ffrt_qos_user_interactive;
qosConfig.qosConfigArray[0].hardLimit = FFRT_USER_INTERACTIVE_MAX_THREAD_NUM;
return ffrt_set_qos_worker_num(&qosConfig);
}
int32_t GetPid()
{
static int32_t pid = static_cast<int32_t>(getpid());
@ -279,7 +267,7 @@ void SceneSessionManager::Init()
}
taskScheduler_->SetExportHandler(eventHandler_);
ret = ConfigFfrtWorkerNum();
ret = ffrt_set_cpu_worker_max_num(ffrt_qos_user_interactive, FFRT_USER_INTERACTIVE_MAX_THREAD_NUM);
TLOGI(WmsLogTag::WMS_MAIN, "FFRT user interactive qos max thread number: %{public}d, retcode: %{public}d",
FFRT_USER_INTERACTIVE_MAX_THREAD_NUM, ret);