From: Unsung Lee Date: Thu, 7 Sep 2023 06:01:00 +0000 (+0900) Subject: conf: Move proc-common to memory-common for consistency X-Git-Tag: accepted/tizen/8.0/unified/20231005.093836~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f6adf72b37a50c44bc11e60bff36cee84ebbab9b;p=platform%2Fcore%2Fsystem%2Fresourced.git conf: Move proc-common to memory-common for consistency Move function and variable of configuration defined in proc-common to memory-common for consistency. foreground_app_list_status_enabled configuration is actually used in LMK (lowmem.c). In addition, both configuration foreground_app_list_status_enabled and lmk_governor_post_wss_enabled are related to LMK post governors. Therefore, function and variable related to two configurations needs to be gathered together in memory-common.c. Change-Id: I0fffbd0fa0bea0846517ffcbbdde17742eaa4681 Signed-off-by: Unsung Lee --- diff --git a/src/common/conf/memory-common.c b/src/common/conf/memory-common.c index 657ae4b..dcc03b2 100644 --- a/src/common/conf/memory-common.c +++ b/src/common/conf/memory-common.c @@ -20,6 +20,7 @@ #include "memory-common.h" static bool lmk_governor_post_wss_enabled = false; +static bool foreground_app_list_status_enabled = false; void lmk_governor_post_enable_wss(void) { @@ -30,3 +31,13 @@ bool lmk_governor_post_is_enabled_of_wss(void) { return lmk_governor_post_wss_enabled; } + +void proc_enable_foreground_app_list_status(void) +{ + foreground_app_list_status_enabled = true; +} + +bool proc_is_enabled_of_foreground_app_list_status(void) +{ + return foreground_app_list_status_enabled; +} diff --git a/src/common/conf/memory-common.h b/src/common/conf/memory-common.h index 866c2d3..b92df0a 100644 --- a/src/common/conf/memory-common.h +++ b/src/common/conf/memory-common.h @@ -27,6 +27,9 @@ extern "C" { void lmk_governor_post_enable_wss(void); bool lmk_governor_post_is_enabled_of_wss(void); +void proc_enable_foreground_app_list_status(void); +bool proc_is_enabled_of_foreground_app_list_status(void); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/src/common/proc-common.c b/src/common/proc-common.c deleted file mode 100644 index dd20d48..0000000 --- a/src/common/proc-common.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * resourced - * - * Copyright (c) 2023 Samsung Electronics Co., Ltd. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "proc-common.h" - -static bool foreground_app_list_status_enabled = false; - -void proc_enable_foreground_app_list_status(void) -{ - foreground_app_list_status_enabled = true; -} - -bool proc_is_enabled_of_foreground_app_list_status(void) -{ - return foreground_app_list_status_enabled; -} diff --git a/src/common/proc-common.h b/src/common/proc-common.h index 41d61e7..833e2eb 100644 --- a/src/common/proc-common.h +++ b/src/common/proc-common.h @@ -315,9 +315,6 @@ GHashTable * fixed_process_list_get(void); struct proc_conf_info* fixed_app_and_service_exist_check(const char *name, enum proc_type proc_type); enum proc_action fixed_app_and_service_watchdog_action(const char *name, enum proc_type proc_type); -void proc_enable_foreground_app_list_status(void); -bool proc_is_enabled_of_foreground_app_list_status(void); - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/src/process/proc-monitor.c b/src/process/proc-monitor.c index cdfb7ed..3183373 100644 --- a/src/process/proc-monitor.c +++ b/src/process/proc-monitor.c @@ -50,6 +50,7 @@ #include "util.h" #include "file-helper.h" #include "watchdog-cgroup.h" +#include "memory-common.h" #include