lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20080626133611.GB5326@linux.vnet.ibm.com>
Date:	Thu, 26 Jun 2008 19:06:11 +0530
From:	Dhaval Giani <dhaval@...ux.vnet.ibm.com>
To:	Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>,
	lkml <linux-kernel@...r.kernel.org>
Subject: [PATCH] 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 <dhaval@...ux.vnet.ibm.com>

Index: linux-2.6-tip/kernel/sched_rt.c
===================================================================
--- linux-2.6-tip.orig/kernel/sched_rt.c	2008-06-23 21:52:33.000000000 +0530
+++ linux-2.6-tip/kernel/sched_rt.c	2008-06-24 22:48:34.000000000 +0530
@@ -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_fi
 		print_rt_rq(m, cpu, rt_rq);
 	rcu_read_unlock();
 }
-#endif
+#endif /* CONFIG_SCHED_DEBUG */
Index: linux-2.6-tip/kernel/sched_fair.c
===================================================================
--- linux-2.6-tip.orig/kernel/sched_fair.c	2008-06-23 21:52:33.000000000 +0530
+++ linux-2.6-tip/kernel/sched_fair.c	2008-06-24 22:55:07.000000000 +0530
@@ -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_r
 
 	return 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:
-- 
regards,
Dhaval
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ