[PATCH 2/5] count_active_rt_tasks() is undefined when CONFIG_PREEMPT_RT is not set.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Also, it looks to me that active_rt_tasks[] was never modified.

Signed-off-by: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>

---

 kernel/timer.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

Index: working/kernel/timer.c
===================================================================
--- working.orig/kernel/timer.c	2007-09-04 16:46:40.000000000 +1000
+++ working/kernel/timer.c	2007-09-04 16:46:54.000000000 +1000
@@ -953,21 +953,25 @@ unsigned long avenrun_rt[3];
 static inline void calc_load(unsigned long ticks)
 {
 	unsigned long active_tasks; /* fixed-point */
-	unsigned long active_rt_tasks; /* fixed-point */
 	static int count = LOAD_FREQ;
+#ifdef CONFIG_PREEMPT_RT
+	unsigned long active_rt_tasks; /* fixed-point */
+#endif
 
 	count -= ticks;
 	if (unlikely(count < 0)) {
 		active_tasks = count_active_tasks();
+#ifdef CONFIG_PREEMPT_RT
 		active_rt_tasks = count_active_rt_tasks();
+#endif
 		do {
 			CALC_LOAD(avenrun[0], EXP_1, active_tasks);
 			CALC_LOAD(avenrun[1], EXP_5, active_tasks);
 			CALC_LOAD(avenrun[2], EXP_15, active_tasks);
 #ifdef CONFIG_PREEMPT_RT
-			CALC_LOAD(avenrun_rt[0], EXP_1, active_tasks);
-			CALC_LOAD(avenrun_rt[1], EXP_5, active_tasks);
-			CALC_LOAD(avenrun_rt[2], EXP_15, active_tasks);
+			CALC_LOAD(avenrun_rt[0], EXP_1, active_rt_tasks);
+			CALC_LOAD(avenrun_rt[1], EXP_5, active_rt_tasks);
+			CALC_LOAD(avenrun_rt[2], EXP_15, active_rt_tasks);
 #endif
 			count += LOAD_FREQ;
 
-
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux