conf: Move proc-common to memory-common for consistency 49/299049/1
authorUnsung Lee <unsung.lee@samsung.com>
Thu, 7 Sep 2023 06:01:00 +0000 (15:01 +0900)
committerUnsung Lee <unsung.lee@samsung.com>
Thu, 14 Sep 2023 02:35:25 +0000 (11:35 +0900)
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 <unsung.lee@samsung.com>
src/common/conf/memory-common.c
src/common/conf/memory-common.h
src/common/proc-common.c [deleted file]
src/common/proc-common.h
src/process/proc-monitor.c

index 657ae4b..dcc03b2 100644 (file)
@@ -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;
+}
index 866c2d3..b92df0a 100644 (file)
@@ -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 (file)
index dd20d48..0000000
+++ /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;
-}
index 41d61e7..833e2eb 100644 (file)
@@ -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 */
index cdfb7ed..3183373 100644 (file)
@@ -50,6 +50,7 @@
 #include "util.h"
 #include "file-helper.h"
 #include "watchdog-cgroup.h"
+#include "memory-common.h"
 
 #include <libsyscommon/libsystemd.h>