summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2002-06-20 06:21:20 +0000
committerpeter <peter@FreeBSD.org>2002-06-20 06:21:20 +0000
commit4830c346487d0f10f6ee751a4b5951e6e6688d03 (patch)
treebff62bbdcdfc1237d8035660837bdd0327caebd3 /sys/ia64
parentf49002f4f645a3830346fc6d790ec32a2d43a4c2 (diff)
downloadFreeBSD-src-4830c346487d0f10f6ee751a4b5951e6e6688d03.zip
FreeBSD-src-4830c346487d0f10f6ee751a4b5951e6e6688d03.tar.gz
Move the "- 1" into the RQB_FFS(mask) macro itself so that
implementations can provide a base zero ffs function if they wish. This changes #define RQB_FFS(mask) (ffs64(mask)) foo = RQB_FFS(mask) - 1; to #define RQB_FFS(mask) (ffs64(mask) - 1) foo = RQB_FFS(mask); On some platforms we can get the "- 1" for free, eg: those that use the C code for ffs64(). Reviewed by: jake (in principle)
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/include/runq.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ia64/include/runq.h b/sys/ia64/include/runq.h
index 3fc658a..9f844b6 100644
--- a/sys/ia64/include/runq.h
+++ b/sys/ia64/include/runq.h
@@ -36,7 +36,7 @@
#define RQB_BIT(pri) (1UL << ((pri) & (RQB_BPW - 1)))
#define RQB_WORD(pri) ((pri) >> RQB_L2BPW)
-#define RQB_FFS(word) (ffs64(word))
+#define RQB_FFS(word) (ffs64(word) - 1)
/*
* Type of run queue status word.
OpenPOWER on IntegriCloud