mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
@@ -1,23 +1,12 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <errno.h>
|
||||
#include <sched.h>
|
||||
#include <signal.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "assert-util.h"
|
||||
#include "fileio.h"
|
||||
#include "format-util.h"
|
||||
#include "macro.h"
|
||||
#include "pidref.h"
|
||||
#include "time-util.h"
|
||||
#include "forward.h"
|
||||
#include "string-util.h"
|
||||
|
||||
#define procfs_file_alloca(pid, field) \
|
||||
({ \
|
||||
@@ -147,17 +136,10 @@ void valgrind_summary_hack(void);
|
||||
|
||||
int pid_compare_func(const pid_t *a, const pid_t *b);
|
||||
|
||||
static inline bool nice_is_valid(int n) {
|
||||
return n >= PRIO_MIN && n < PRIO_MAX;
|
||||
}
|
||||
bool nice_is_valid(int n);
|
||||
|
||||
static inline bool sched_policy_is_valid(int i) {
|
||||
return IN_SET(i, SCHED_OTHER, SCHED_BATCH, SCHED_IDLE, SCHED_FIFO, SCHED_RR);
|
||||
}
|
||||
|
||||
static inline bool sched_priority_is_valid(int i) {
|
||||
return i >= 0 && i <= sched_get_priority_max(SCHED_RR);
|
||||
}
|
||||
bool sched_policy_is_valid(int i) _const_;
|
||||
bool sched_priority_is_valid(int i) _const_;
|
||||
|
||||
#define PID_AUTOMATIC ((pid_t) INT_MIN) /* special value indicating "acquire pid from connection peer" */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user