Update of /cvsroot/linux-vax/kernel-2.5/include/asm-vax
In directory usw-pr-cvs1:/tmp/cvs-serv17578
Modified Files:
mmu_context.h
Log Message:
2.5.3's scheduler no longer wants sched_find_first_zero_bit(), but would
prefer sched_find_first_bit()
Index: mmu_context.h
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/mmu_context.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- mmu_context.h 5 Jun 2002 21:55:04 -0000 1.4
+++ mmu_context.h 6 Jun 2002 00:07:33 -0000 1.5
@@ -16,18 +16,19 @@
# error update this function.
#endif
-static inline int sched_find_first_zero_bit(char *bitmap)
+static inline int sched_find_first_bit(unsigned long *b)
{
- unsigned int *b = (unsigned int *)bitmap;
- unsigned int rt;
-
- rt = b[0] & b[1] & b[2] & b[3];
- if (unlikely(rt != 0xffffffff))
- return find_first_zero_bit(bitmap, MAX_RT_PRIO);
-
- if (b[4] != ~0)
- return ffz(b[4]) + MAX_RT_PRIO;
- return ffz(b[5]) + 32 + MAX_RT_PRIO;
+ 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 (unlikely(b[3]))
+ return __ffs(b[3]) + 96;
+ if (b[4])
+ return __ffs(b[4]) + 128;
+ return __ffs(b[5]) + 32 + 128;
}
|