Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Linus 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: Ingo Molnar <mingo@kernel.org>

+21 -13
+5 -3
include/linux/sched/deadline.h
··· 1 - #ifndef _SCHED_DEADLINE_H 2 - #define _SCHED_DEADLINE_H 1 + #ifndef _LINUX_SCHED_DEADLINE_H 2 + #define _LINUX_SCHED_DEADLINE_H 3 + 4 + #include <linux/sched.h> 3 5 4 6 /* 5 7 * SCHED_DEADLINE tasks has negative priorities, reflecting ··· 28 26 return (s64)(a - b) < 0; 29 27 } 30 28 31 - #endif /* _SCHED_DEADLINE_H */ 29 + #endif /* _LINUX_SCHED_DEADLINE_H */
+3 -3
include/linux/sched/prio.h
··· 1 - #ifndef _SCHED_PRIO_H 2 - #define _SCHED_PRIO_H 1 + #ifndef _LINUX_SCHED_PRIO_H 2 + #define _LINUX_SCHED_PRIO_H 3 3 4 4 #define MAX_NICE 19 5 5 #define MIN_NICE -20 ··· 57 57 return (MAX_NICE - prio + 1); 58 58 } 59 59 60 - #endif /* _SCHED_PRIO_H */ 60 + #endif /* _LINUX_SCHED_PRIO_H */
+6 -4
include/linux/sched/rt.h
··· 1 - #ifndef _SCHED_RT_H 2 - #define _SCHED_RT_H 1 + #ifndef _LINUX_SCHED_RT_H 2 + #define _LINUX_SCHED_RT_H 3 3 4 - #include <linux/sched/prio.h> 4 + #include <linux/sched.h> 5 + 6 + struct task_struct; 5 7 6 8 static inline int rt_prio(int prio) 7 9 { ··· 59 57 */ 60 58 #define RR_TIMESLICE (100 * HZ / 1000) 61 59 62 - #endif /* _SCHED_RT_H */ 60 + #endif /* _LINUX_SCHED_RT_H */
+7 -3
include/linux/sched/sysctl.h
··· 1 - #ifndef _SCHED_SYSCTL_H 2 - #define _SCHED_SYSCTL_H 1 + #ifndef _LINUX_SCHED_SYSCTL_H 2 + #define _LINUX_SCHED_SYSCTL_H 3 + 4 + #include <linux/types.h> 5 + 6 + struct ctl_table; 3 7 4 8 #ifdef CONFIG_DETECT_HUNG_TASK 5 9 extern int sysctl_hung_task_check_count; ··· 82 78 void __user *buffer, size_t *lenp, 83 79 loff_t *ppos); 84 80 85 - #endif /* _SCHED_SYSCTL_H */ 81 + #endif /* _LINUX_SCHED_SYSCTL_H */