提交 9ccd27cc 编写于 作者: I Ingo Molnar

sched/headers: Make all include/linux/sched/*.h headers build standalone

Make each header self-sufficient, so that it can be built successfully
both in an allnoconfig and allyesconfig kernel.

Also standardize the naming of their header guards.
Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: NIngo Molnar <mingo@kernel.org>
上级 4977ab6e
#ifndef _SCHED_DEADLINE_H #ifndef _LINUX_SCHED_DEADLINE_H
#define _SCHED_DEADLINE_H #define _LINUX_SCHED_DEADLINE_H
#include <linux/sched.h>
/* /*
* SCHED_DEADLINE tasks has negative priorities, reflecting * SCHED_DEADLINE tasks has negative priorities, reflecting
...@@ -26,4 +28,4 @@ static inline bool dl_time_before(u64 a, u64 b) ...@@ -26,4 +28,4 @@ static inline bool dl_time_before(u64 a, u64 b)
return (s64)(a - b) < 0; return (s64)(a - b) < 0;
} }
#endif /* _SCHED_DEADLINE_H */ #endif /* _LINUX_SCHED_DEADLINE_H */
#ifndef _SCHED_PRIO_H #ifndef _LINUX_SCHED_PRIO_H
#define _SCHED_PRIO_H #define _LINUX_SCHED_PRIO_H
#define MAX_NICE 19 #define MAX_NICE 19
#define MIN_NICE -20 #define MIN_NICE -20
...@@ -57,4 +57,4 @@ static inline long rlimit_to_nice(long prio) ...@@ -57,4 +57,4 @@ static inline long rlimit_to_nice(long prio)
return (MAX_NICE - prio + 1); return (MAX_NICE - prio + 1);
} }
#endif /* _SCHED_PRIO_H */ #endif /* _LINUX_SCHED_PRIO_H */
#ifndef _SCHED_RT_H #ifndef _LINUX_SCHED_RT_H
#define _SCHED_RT_H #define _LINUX_SCHED_RT_H
#include <linux/sched/prio.h> #include <linux/sched.h>
struct task_struct;
static inline int rt_prio(int prio) static inline int rt_prio(int prio)
{ {
...@@ -57,4 +59,4 @@ extern void normalize_rt_tasks(void); ...@@ -57,4 +59,4 @@ extern void normalize_rt_tasks(void);
*/ */
#define RR_TIMESLICE (100 * HZ / 1000) #define RR_TIMESLICE (100 * HZ / 1000)
#endif /* _SCHED_RT_H */ #endif /* _LINUX_SCHED_RT_H */
#ifndef _SCHED_SYSCTL_H #ifndef _LINUX_SCHED_SYSCTL_H
#define _SCHED_SYSCTL_H #define _LINUX_SCHED_SYSCTL_H
#include <linux/types.h>
struct ctl_table;
#ifdef CONFIG_DETECT_HUNG_TASK #ifdef CONFIG_DETECT_HUNG_TASK
extern int sysctl_hung_task_check_count; extern int sysctl_hung_task_check_count;
...@@ -78,4 +82,4 @@ extern int sysctl_schedstats(struct ctl_table *table, int write, ...@@ -78,4 +82,4 @@ extern int sysctl_schedstats(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, void __user *buffer, size_t *lenp,
loff_t *ppos); loff_t *ppos);
#endif /* _SCHED_SYSCTL_H */ #endif /* _LINUX_SCHED_SYSCTL_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册