svn commit: r210605 - head/sys/mips/include
Jayachandran C.
jchandra at FreeBSD.org
Thu Jul 29 13:52:47 UTC 2010
Author: jchandra
Date: Thu Jul 29 13:52:46 2010
New Revision: 210605
URL: http://svn.freebsd.org/changeset/base/210605
Log:
Fix RQB_FFS for 64 bit, we need to use ffsl() for 64bit.
Use 'ifdef __mips_n64' instead of 'if defined' to be consistant with other
usage.
Modified:
head/sys/mips/include/runq.h
Modified: head/sys/mips/include/runq.h
==============================================================================
--- head/sys/mips/include/runq.h Thu Jul 29 13:46:37 2010 (r210604)
+++ head/sys/mips/include/runq.h Thu Jul 29 13:52:46 2010 (r210605)
@@ -30,7 +30,7 @@
#ifndef _MACHINE_RUNQ_H_
#define _MACHINE_RUNQ_H_
-#if defined(__mips_n64)
+#ifdef __mips_n64
#define RQB_LEN (1) /* Number of priority status words. */
#define RQB_L2BPW (6) /* Log2(sizeof(rqb_word_t) * NBBY)). */
#else
@@ -42,12 +42,16 @@
#define RQB_BIT(pri) (1ul << ((pri) & (RQB_BPW - 1)))
#define RQB_WORD(pri) ((pri) >> RQB_L2BPW)
+#ifdef __mips_n64
+#define RQB_FFS(word) (ffsl(word) - 1)
+#else
#define RQB_FFS(word) (ffs(word) - 1)
+#endif
/*
* Type of run queue status word.
*/
-#if defined(__mips_n64)
+#ifdef __mips_n64
typedef u_int64_t rqb_word_t;
#else
typedef u_int32_t rqb_word_t;
More information about the svn-src-all
mailing list