make sched_{fair,rt}.c ifdefs more readable
PATCH 1/1 make sched_{fair,rt}.c ifdefs more readable
Hi Ingo,
Another patch to make the ifdef jungle more readable :)
Thanks,
sched: Make sched_{rt,fair}.c ifdefs more readable
Signed-off-by Dhaval Giani <[email protected]>
kernel/sched_rt.c +5 -5
@@ -161,7 +161,7 @@ static inline struct rt_bandwidth *sched return &rt_rq->tg->rt_bandwidth; } -#else +#else /* !CONFIG_RT_GROUP_SCHED */ static inline u64 sched_rt_runtime (struct rt_rq *rt_rq) {
@@ -226,7 +226,7 @@ static inline struct rt_bandwidth *sched return &def_rt_bandwidth; } -#endif +#endif /* CONFIG_RT_GROUP_SCHED */ #ifdef CONFIG_SMP static int do_balance_runtime (struct rt_rq *rt_rq)
@@ -375,12 +375,12 @@ static int balance_runtime(struct rt_rq return more; } -#else +#else /* !CONFIG_SMP */ static inline int balance_runtime (struct rt_rq *rt_rq) {return 0 ; } -#endif +#endif /* CONFIG_SMP */ static int do_sched_rt_period_timer (struct rt_bandwidth *rt_b,int overrun) {
@@ -1470,4 +1470,4 @@ static void print_rt_stats(struct seq_fiprint_rt_rq (m, cpu, rt_rq); rcu_read_unlock(); } -#endif +#endif /* CONFIG_SCHED_DEBUG */
kernel/sched_fair.c +5 -5
@@ -832,7 +832,7 @@ static void hrtick_start_fair(struct rq hrtick_start(rq, delta, requeue); } } -#else +#else /* !CONFIG_SCHED_HRTICK */ static inline void hrtick_start_fair (struct rq *rq,struct task_struct *p) {
@@ -973,7 +973,7 @@ static int wake_idle(int cpu, struct tas }return cpu; } -#else +#else /* !ARCH_HAS_SCHED_WAKE_IDLE*/ static inline int wake_idle (int cpu,struct task_struct *p) {return cpu;
@@ -1318,7 +1318,7 @@ static int cfs_rq_best_prio(struct cfs_rreturn p->prio; } -#endif +#endif /* CONFIG_FAIR_GROUP_SCHED */ static unsigned long load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest,
@@ -1351,7 +1351,7 @@ load_balance_fair(struct rq *this_rq, in maxload =min (rem_load_move, imbalance); *this_best_prio =cfs_rq_best_prio (this_cfs_rq); -#else +#else /* !CONFIG_FAIR_GROUP_SCHED */ # define maxload rem_load_move#endif /*
@@ -1394,7 +1394,7 @@ move_one_task_fair(struct rq *this_rq, i return 0; } -#endif +#endif /* CONFIG_SMP */ /* * scheduler tick hitting a task of our scheduling class:
Signature · 2 lines
regards, Dhaval