]> err.no Git - linux-2.6/commitdiff
sched: fix the cpuprio count really
authorThomas Gleixner <tglx@linutronix.de>
Thu, 5 Jun 2008 08:28:00 +0000 (10:28 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 6 Jun 2008 13:19:44 +0000 (15:19 +0200)
Peter pointed out that the last version of the "fix" was still one off
under certain circumstances. Use BITS_TO_LONG instead to get an
accurate result.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/sched_cpupri.h

index 6b38355e267627402cdf9b4a712a1dc0ed4ca3fd..f25811b0f931fffb7276a10562cb1e366f12dfdb 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <linux/sched.h>
 
-#define CPUPRI_NR_PRIORITIES 2+MAX_RT_PRIO
-#define CPUPRI_NR_PRI_WORDS (CPUPRI_NR_PRIORITIES + BITS_PER_LONG/2)/BITS_PER_LONG
+#define CPUPRI_NR_PRIORITIES   (MAX_RT_PRIO + 2)
+#define CPUPRI_NR_PRI_WORDS    BITS_TO_LONGS(CPUPRI_NR_PRIORITIES)
 
 #define CPUPRI_INVALID -1
 #define CPUPRI_IDLE     0