summaryrefslogtreecommitdiffstats
path: root/src/basic/cgroup-util.h
diff options
context:
space:
mode:
authorAnita Zhang <the.anitazha@gmail.com>2021-02-09 11:05:11 +0100
committerAnita Zhang <the.anitazha@gmail.com>2021-02-09 11:27:37 +0100
commit242d75bdaaa6f222a47148f8a83cc425d6ceefb3 (patch)
tree6d8b9e5dc7fb91015c922086b5d69ff59c8fc62e /src/basic/cgroup-util.h
parentoom: skip over cgroups with no memory usage (diff)
downloadsystemd-242d75bdaaa6f222a47148f8a83cc425d6ceefb3.tar.xz
systemd-242d75bdaaa6f222a47148f8a83cc425d6ceefb3.zip
cgroup-util: add ManagedOOMPreference enum to use between pid1 and oomd
Diffstat (limited to 'src/basic/cgroup-util.h')
-rw-r--r--src/basic/cgroup-util.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/basic/cgroup-util.h b/src/basic/cgroup-util.h
index bdc0d0d086..0e6d27dead 100644
--- a/src/basic/cgroup-util.h
+++ b/src/basic/cgroup-util.h
@@ -288,3 +288,14 @@ typedef enum ManagedOOMMode {
const char* managed_oom_mode_to_string(ManagedOOMMode m) _const_;
ManagedOOMMode managed_oom_mode_from_string(const char *s) _pure_;
+
+typedef enum ManagedOOMPreference {
+ MANAGED_OOM_PREFERENCE_NONE = 0,
+ MANAGED_OOM_PREFERENCE_AVOID = 1,
+ MANAGED_OOM_PREFERENCE_OMIT = 2,
+ _MANAGED_OOM_PREFERENCE_MAX,
+ _MANAGED_OOM_PREFERENCE_INVALID = -1
+} ManagedOOMPreference;
+
+const char* managed_oom_preference_to_string(ManagedOOMPreference a) _const_;
+ManagedOOMPreference managed_oom_preference_from_string(const char *s) _pure_;