aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorKrzysztof Helt <krzysztof.h1@poczta.fm>2008-09-05 17:46:19 -0400
committerIngo Molnar <mingo@elte.hu>2008-09-06 09:17:09 -0400
commitc8bfff6dd4d41834f4952cbc49e28e31906a6188 (patch)
tree023ce4fb0b61ffa40b48cb96539f0f91c06cb853 /kernel/sched.c
parent7940ca3605b77f20cc6e9852e4ca6f2d725b5653 (diff)
sched: compilation fix with gcc 3.4.6
I found that 2.6.27-rc5-mm1 does not compile with gcc 3.4.6. The error is: CC kernel/sched.o kernel/sched.c: In function `start_rt_bandwidth': kernel/sched.c:208: sorry, unimplemented: inlining failed in call to 'rt_bandwidth_enabled': function body not available kernel/sched.c:214: sorry, unimplemented: called from here make[1]: *** [kernel/sched.o] Error 1 make: *** [kernel] Error 2 It seems that the gcc 3.4.6 requires full inline definition before first usage. The patch below fixes the compilation problem. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> (if needed> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 703f56d5db5f..4de2bfb28c58 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -204,7 +204,10 @@ void init_rt_bandwidth(struct rt_bandwidth *rt_b, u64 period, u64 runtime)
204 rt_b->rt_period_timer.cb_mode = HRTIMER_CB_IRQSAFE_NO_SOFTIRQ; 204 rt_b->rt_period_timer.cb_mode = HRTIMER_CB_IRQSAFE_NO_SOFTIRQ;
205} 205}
206 206
207static inline int rt_bandwidth_enabled(void); 207static inline int rt_bandwidth_enabled(void)
208{
209 return sysctl_sched_rt_runtime >= 0;
210}
208 211
209static void start_rt_bandwidth(struct rt_bandwidth *rt_b) 212static void start_rt_bandwidth(struct rt_bandwidth *rt_b)
210{ 213{
@@ -841,11 +844,6 @@ static inline u64 global_rt_runtime(void)
841 return (u64)sysctl_sched_rt_runtime * NSEC_PER_USEC; 844 return (u64)sysctl_sched_rt_runtime * NSEC_PER_USEC;
842} 845}
843 846
844static inline int rt_bandwidth_enabled(void)
845{
846 return sysctl_sched_rt_runtime >= 0;
847}
848
849#ifndef prepare_arch_switch 847#ifndef prepare_arch_switch
850# define prepare_arch_switch(next) do { } while (0) 848# define prepare_arch_switch(next) do { } while (0)
851#endif 849#endif