Revert "Make oom_score_adjust_is_valid() static"

This reverts commit 6bf3c6c900.
This commit is contained in:
Lennart Poettering
2021-07-28 18:39:41 +02:00
parent fac5588944
commit c4412d4d33
3 changed files with 6 additions and 5 deletions
+4
View File
@@ -1037,6 +1037,10 @@ bool is_main_thread(void) {
return cached > 0;
}
bool oom_score_adjust_is_valid(int oa) {
return oa >= OOM_SCORE_ADJ_MIN && oa <= OOM_SCORE_ADJ_MAX;
}
unsigned long personality_from_string(const char *p) {
int architecture;
+2
View File
@@ -82,6 +82,8 @@ int pid_from_same_root_fs(pid_t pid);
bool is_main_thread(void);
bool oom_score_adjust_is_valid(int oa);
#ifndef PERSONALITY_INVALID
/* personality(7) documents that 0xffffffffUL is used for querying the
* current personality, hence let's use that here as error
-5
View File
@@ -1,6 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/oom.h>
#include <sys/mount.h>
#include <sys/prctl.h>
@@ -95,10 +94,6 @@ static int property_get_environment_files(
return sd_bus_message_close_container(reply);
}
static bool oom_score_adjust_is_valid(int oa) {
return oa >= OOM_SCORE_ADJ_MIN && oa <= OOM_SCORE_ADJ_MAX;
}
static int property_get_oom_score_adjust(
sd_bus *bus,
const char *path,