Whamcloud - gitweb
use userland bitops from libcfs.
[fs/lustre-release.git] / lustre / include / liblustre.h
index 0fbd5bd..2fb2eec 100644 (file)
@@ -65,9 +65,9 @@
 #include <assert.h>
 
 #include <libcfs/list.h>
-#include <libcfs/user-bitops.h>
 #include <lnet/lnet.h>
 #include <libcfs/kp30.h>
+#include <libcfs/user-bitops.h>
 
 /* definitions for liblustre */
 
@@ -189,35 +189,6 @@ typedef int (write_proc_t)(struct file *file, const char *buffer,
  * to allow the compiler to adjust the bit shifting accordingly
  */
 
-/* test if bit nr is set in bitmap addr; returns previous value of bit nr */
-static __inline__ int set_bit(int nr, long * addr)
-{
-        long    mask;
-
-        addr += nr / BITS_PER_LONG;
-        mask = 1UL << (nr & (BITS_PER_LONG - 1));
-        nr = (mask & *addr) != 0;
-        *addr |= mask;
-        return nr;
-}
-
-/* clear bit nr in bitmap addr; returns previous value of bit nr*/
-static __inline__ int clear_bit(int nr, long * addr)
-{
-        long    mask;
-
-        addr += nr / BITS_PER_LONG;
-        mask = 1UL << (nr & (BITS_PER_LONG - 1));
-        nr = (mask & *addr) != 0;
-        *addr &= ~mask;
-        return nr;
-}
-
-static __inline__ int test_bit(int nr, const long * addr)
-{
-        return ((1UL << (nr & (BITS_PER_LONG - 1))) & ((addr)[nr / BITS_PER_LONG])) != 0;
-}
-
 static __inline__ int ext2_set_bit(int nr, void *addr)
 {
         return set_bit(nr, (long*)addr);