diff --git a/base/sched_list.hh b/base/sched_list.hh index 0e2f3ddcb..f794e3514 100644 --- a/base/sched_list.hh +++ b/base/sched_list.hh @@ -30,8 +30,10 @@ #define SCHED_LIST_HH #include +#include "base/intmath.hh" #include "base/misc.hh" + // Any types you use this class for must be covered here... namespace { void ClearEntry(int &i) { i = 0; }; @@ -80,7 +82,7 @@ SchedList::SchedList(unsigned _size) size = _size; // size must be a power of two - if (size & (size-1)) { + if (!isPowerOf2(size)) { panic("SchedList: size must be a power of two"); }