From: Hwankyu Jhun Date: Thu, 5 Oct 2023 07:53:57 +0000 (+0900) Subject: Check SCHED_PRIORITY value X-Git-Tag: accepted/tizen/unified/20231101.174516~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ce12814d38a911e5bf8e362d46c3972a73e1275f;p=platform%2Fcore%2Fappfw%2Flaunchpad.git Check SCHED_PRIORITY value If the SCHED_PRIORITY value is not 0, the app-defined-loader and the launchpad-loader set the scheduling priority to 0. Change-Id: I0281548e724f2d3a7caba981630d48d3a790a6e2 Signed-off-by: Hwankyu Jhun --- diff --git a/src/app-defined-loader/app-defined-loader.cc b/src/app-defined-loader/app-defined-loader.cc index 1d55100a..4ff94d48 100644 --- a/src/app-defined-loader/app-defined-loader.cc +++ b/src/app-defined-loader/app-defined-loader.cc @@ -158,7 +158,9 @@ class AppDefinedLoader { _exit(EXIT_FAILURE); } - SchedPriority::Set(0); + auto* priority = bundle_get_val(extra, "SCHED_PRIORITY"); + if (priority && strcmp(priority, "0") != 0) + SchedPriority::Set(0); } static int OnLaunch(int argc, char** argv, const char* app_path, diff --git a/src/launchpad-loader/launchpad_loader.cc b/src/launchpad-loader/launchpad_loader.cc index d1cdf6f7..d3cf7b4a 100644 --- a/src/launchpad-loader/launchpad_loader.cc +++ b/src/launchpad-loader/launchpad_loader.cc @@ -175,7 +175,9 @@ void LaunchpadLoader::OnCreate(const tizen_base::Bundle& extra, int type) { InitializeElementary(); hw_acc_config_.reset(new launchpad::HWAccelerationConfig()); - SchedPriority::Set(0); + auto priority = extra.GetString("SCHED_PRIORITY"); + if (priority != "0") + SchedPriority::Set(0); } int LaunchpadLoader::OnLaunch(const LaunchArgs& args) { diff --git a/src/launchpad-process-pool/loader_info.cc b/src/launchpad-process-pool/loader_info.cc index df00c5c1..96aa9bd3 100644 --- a/src/launchpad-process-pool/loader_info.cc +++ b/src/launchpad-process-pool/loader_info.cc @@ -278,6 +278,7 @@ LoaderInfo::LoaderInfo(LoaderType type, std::string name, std::string exe, on_boot_timeout_(on_boot_timeout), sched_priority_(sched_priority), condition_path_exists_(std::move(condition_path_exists)) { + extra_.Add("SCHED_PRIORITY", std::to_string(sched_priority_)); } LoaderType LoaderInfo::GetType() const {