]> git.neil.brown.name Git - history.git/commitdiff
move sched_find_first_bit() from mmu_context.h to bitops.h, it belongs there.
authorIngo Molnar <mingo@elte.hu>
Tue, 12 Feb 2002 19:05:41 +0000 (20:05 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 12 Feb 2002 19:05:41 +0000 (20:05 +0100)
include/asm-i386/bitops.h
include/asm-i386/mmu_context.h

index 7ff7555040e1f5c93c07cbd79e52396a5a8d8d93..77a1ab71d26136f3eb794b5b8b3eb7fc0b16219a 100644 (file)
@@ -415,6 +415,25 @@ static __inline__ unsigned long __ffs(unsigned long word)
 
 #ifdef __KERNEL__
 
+/*
+ * Every architecture must define this function. It's the fastest
+ * way of searching a 140-bit bitmap where the first 100 bits are
+ * unlikely to be set. It's guaranteed that at least one of the 140
+ * bits is cleared.
+ */
+static inline int sched_find_first_bit(unsigned long *b)
+{
+       if (unlikely(b[0]))
+               return __ffs(b[0]);
+       if (unlikely(b[1]))
+               return __ffs(b[1]) + 32;
+       if (unlikely(b[2]))
+               return __ffs(b[2]) + 64;
+       if (b[3])
+               return __ffs(b[3]) + 96;
+       return __ffs(b[4]) + 128;
+}
+
 /**
  * ffs - find first bit set
  * @x: the word to search
index 79df13ec9d6b40e729fbf8a6b8256e1953370c57..e44c19374aeecb13067dd5b95f2050a40afc6637 100644 (file)
@@ -6,24 +6,6 @@
 #include <asm/atomic.h>
 #include <asm/pgalloc.h>
 
-/*
- * Every architecture must define this function. It's the fastest
- * way of searching a 140-bit bitmap where the first 100 bits are
- * unlikely to be set. It's guaranteed that at least one of the 140
- * bits is cleared.
- */
-static inline int sched_find_first_bit(unsigned long *b)
-{
-       if (unlikely(b[0]))
-               return __ffs(b[0]);
-       if (unlikely(b[1]))
-               return __ffs(b[1]) + 32;
-       if (unlikely(b[2]))
-               return __ffs(b[2]) + 64;
-       if (b[3])
-               return __ffs(b[3]) + 96;
-       return __ffs(b[4]) + 128;
-}
 /*
  * possibly do the LDT unload here?
  */