diff options
author | Hwankyu Jhun <h.jhun@samsung.com> | 2023-10-05 16:53:57 +0900 |
---|---|---|
committer | Hwankyu Jhun <h.jhun@samsung.com> | 2023-10-05 16:53:57 +0900 |
commit | ce12814d38a911e5bf8e362d46c3972a73e1275f (patch) | |
tree | e218e1486eaca48b89c07164ed03830f78ba231b | |
parent | 2adc85022561550b8c8cebad0bac494fdbf9fab2 (diff) | |
download | launchpad-ce12814d38a911e5bf8e362d46c3972a73e1275f.tar.gz launchpad-ce12814d38a911e5bf8e362d46c3972a73e1275f.tar.bz2 launchpad-ce12814d38a911e5bf8e362d46c3972a73e1275f.zip |
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 <h.jhun@samsung.com>
-rw-r--r-- | src/app-defined-loader/app-defined-loader.cc | 4 | ||||
-rw-r--r-- | src/launchpad-loader/launchpad_loader.cc | 4 | ||||
-rw-r--r-- | src/launchpad-process-pool/loader_info.cc | 1 |
3 files changed, 7 insertions, 2 deletions
diff --git a/src/app-defined-loader/app-defined-loader.cc b/src/app-defined-loader/app-defined-loader.cc index 1d55100..4ff94d4 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 d1cdf6f..d3cf7b4 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 df00c5c..96aa9bd 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 { |