Reconfigure the runq macros to use the 64 bit ffs/bsf routines instead

of doing a loop and taking two 32 bit passes at the runqueue bits.  All
the 64 bit platforms should probably do this since there are 64 run queues.

Approved by:  re (scottl)
This commit is contained in:
Peter Wemm 2003-12-06 23:24:18 +00:00
parent 176ce2b1f4
commit 3db6450423

View File

@ -29,18 +29,18 @@
#ifndef _MACHINE_RUNQ_H_
#define _MACHINE_RUNQ_H_
#define RQB_LEN (2) /* Number of priority status words. */
#define RQB_L2BPW (5) /* Log2(sizeof(rqb_word_t) * NBBY)). */
#define RQB_LEN (1) /* Number of priority status words. */
#define RQB_L2BPW (6) /* Log2(sizeof(rqb_word_t) * NBBY)). */
#define RQB_BPW (1<<RQB_L2BPW) /* Bits in an rqb_word_t. */
#define RQB_BIT(pri) (1 << ((pri) & (RQB_BPW - 1)))
#define RQB_BIT(pri) (1ul << ((pri) & (RQB_BPW - 1)))
#define RQB_WORD(pri) ((pri) >> RQB_L2BPW)
#define RQB_FFS(word) (ffs(word) - 1)
#define RQB_FFS(word) (bsfq(word))
/*
* Type of run queue status word.
*/
typedef u_int32_t rqb_word_t;
typedef u_int64_t rqb_word_t;
#endif