Re: [PATCH] Simplified scalable cpu bitmasks

Ingo Molnar (mingo@elte.hu)
Mon, 12 Aug 2002 11:26:20 +0200 (CEST)


i'd suggest to introduce one more helper define:

#define BITS_TO_LONG(bits) \
(((bits)+BITS_PER_LONG-1)/BITS_PER_LONG)

this IMO simplifies some of the initializers, eg. the all-1 cpu-mask:

#define CPU_MASK_ALL \
{ [0 ... BITS_TO_LONG(NR_CPUS)-1] = ~0UL }

Ingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/