Skip to content

Commit

Permalink
sched: fix the cpuprio count really
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Jun 6, 2008
1 parent 709d4b0 commit e539d8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/sched_cpupri.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e539d8f

Please sign in to comment.