Re: [PATCH] 2.5: MAX_PRIO cleanup

From: Robert Love (rml@tech9.net)
Date: Tue Apr 23 2002 - 13:24:23 EST


On Tue, 2002-04-23 at 12:14, Ingo Molnar wrote:

> hm, perhaps it was only my own internal version then.
>
> in any case, you can use the find_first_zero_bit() library function i
> added for exactly this purpose. Any problems with that? It wont be the
> fastest option, but it will do.

Err find_first_bit ?

I guess that will work but your hand-coded version is so much faster :)

I would need to abstract sched_find_first_bit into a generic function
that also accepted a size argument. Something like:

Rename sched_find_first_bit to _sched_find_first_bit, and

#if MAX_RT_PRIO < 120 && MAX_RT_PRIO > 99
#define sched_find_first_bit(b, size) _sched_find_first_bit(b)
#else
#define sched_find_first_bit(b, size) find_first_bit(b, size)
#endif

We can let MAX_RT_PRIO go up 120 since the bitmap is actually 160, not
140, size 5*32=160.

Look good?

        Robert Love

-
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/



This archive was generated by hypermail 2b29 : Tue Apr 23 2002 - 22:00:36 EST