From 7d02ec432105640fa6c5f08fc00a903d8fc17ead Mon Sep 17 00:00:00 2001 From: Unsung Lee Date: Tue, 25 Jul 2023 19:09:00 +0900 Subject: [PATCH] plugin-api: resourced: Add enum syscommon_resourced_memory_lmk_oom_level 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 --- .../resourced/include/syscommon-plugin-resourced-memory-lmk.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugin-api/resourced/include/syscommon-plugin-resourced-memory-lmk.h b/src/plugin-api/resourced/include/syscommon-plugin-resourced-memory-lmk.h index bdcb8e8..fb070ae 100644 --- a/src/plugin-api/resourced/include/syscommon-plugin-resourced-memory-lmk.h +++ b/src/plugin-api/resourced/include/syscommon-plugin-resourced-memory-lmk.h @@ -32,6 +32,14 @@ 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. -- 2.7.4