diff options
author | peter <peter@FreeBSD.org> | 2003-12-06 23:24:18 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2003-12-06 23:24:18 +0000 |
commit | a2b247f294fb17ba705f2ad4191ab8a798210820 (patch) | |
tree | 171f441887d0f0f506a2920a19ff2cb9d1c2f01f /sys/amd64 | |
parent | 955dcc87c12e5c1e8d571b6776bd8b2d326d650b (diff) | |
download | FreeBSD-src-a2b247f294fb17ba705f2ad4191ab8a798210820.zip FreeBSD-src-a2b247f294fb17ba705f2ad4191ab8a798210820.tar.gz |
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)
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/include/runq.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/amd64/include/runq.h b/sys/amd64/include/runq.h index 2a21bfa..0f2f4ef 100644 --- a/sys/amd64/include/runq.h +++ b/sys/amd64/include/runq.h @@ -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 |