plugin-api: resourced: Add enum syscommon_resourced_memory_lmk_oom_level 32/296332/5
authorUnsung Lee <unsung.lee@samsung.com>
Tue, 25 Jul 2023 10:09:00 +0000 (19:09 +0900)
committerUnsung Lee <unsung.lee@samsung.com>
Sun, 30 Jul 2023 04:46:33 +0000 (13:46 +0900)
Add enumeration of oom level into libsyscommon to reference it
from both resourced and resourced plugin-backend

Oom level will be referenced by resourced and resourced backend
when LMK is triggered by low memory. Therefore, it should be located in
common library (i.e., libsyscommon)

Change-Id: I2dcc1c7e3768dccf5db256845614557b6d8dc60c
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
src/plugin-api/resourced/include/syscommon-plugin-resourced-memory-lmk.h

index bdcb8e8..fb070ae 100644 (file)
 extern "C" {
 #endif
 
+enum syscommon_resourced_memory_lmk_oom_level {
+       OOM_LEVEL_BACKGROUND_LEAST_RECENTLY_USED,
+       OOM_LEVEL_BACKGROUND_MOST_RECENTLY_USED,
+       OOM_LEVEL_FOREGROUND,
+       OOM_LEVEL_FOREGROUND_AND_PROC,
+       OOM_LEVEL_ALL,
+};
+
 struct task_info {
        /*
         * Mostly, there are not multiple processes with the same pgid.