diff options
Diffstat (limited to 'src/libsystemd-basic/include/systemd-basic/process-util.h')
-rw-r--r-- | src/libsystemd-basic/include/systemd-basic/process-util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsystemd-basic/include/systemd-basic/process-util.h b/src/libsystemd-basic/include/systemd-basic/process-util.h index 9f75088796..aa51357172 100644 --- a/src/libsystemd-basic/include/systemd-basic/process-util.h +++ b/src/libsystemd-basic/include/systemd-basic/process-util.h @@ -25,6 +25,7 @@ #include <stddef.h> #include <stdio.h> #include <string.h> +#include <sys/resource.h> #include <sys/types.h> #include "formats-util.h" @@ -103,3 +104,7 @@ int sched_policy_from_string(const char *s); void valgrind_summary_hack(void); int pid_compare_func(const void *a, const void *b); + +static inline bool nice_is_valid(int n) { + return n >= PRIO_MIN && n < PRIO_MAX; +} |