summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
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/powerpc
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/powerpc')
-rw-r--r--sys/powerpc/include/runq.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/powerpc/include/runq.h b/sys/powerpc/include/runq.h
index 1ea7735..2a21bfa 100644
--- a/sys/powerpc/include/runq.h
+++ b/sys/powerpc/include/runq.h
@@ -36,7 +36,7 @@
#define RQB_BIT(pri) (1 << ((pri) & (RQB_BPW - 1)))
#define RQB_WORD(pri) ((pri) >> RQB_L2BPW)
-#define RQB_FFS(word) (ffs(word))
+#define RQB_FFS(word) (ffs(word) - 1)
/*
* Type of run queue status word.
OpenPOWER on IntegriCloud