|
@@ -29,21 +29,7 @@
|
|
|
(bit) < (size); \
|
|
|
(bit) = find_next_bit((addr), (size), (bit) + 1))
|
|
|
|
|
|
-static inline void set_bit(int nr, unsigned long *addr)
|
|
|
-{
|
|
|
- addr[nr / BITS_PER_LONG] |= 1UL << (nr % BITS_PER_LONG);
|
|
|
-}
|
|
|
-
|
|
|
-static inline void clear_bit(int nr, unsigned long *addr)
|
|
|
-{
|
|
|
- addr[nr / BITS_PER_LONG] &= ~(1UL << (nr % BITS_PER_LONG));
|
|
|
-}
|
|
|
-
|
|
|
-static __always_inline int test_bit(unsigned int nr, const unsigned long *addr)
|
|
|
-{
|
|
|
- return ((1UL << (nr % BITS_PER_LONG)) &
|
|
|
- (((unsigned long *)addr)[nr / BITS_PER_LONG])) != 0;
|
|
|
-}
|
|
|
+#include <asm-generic/bitops/atomic.h>
|
|
|
|
|
|
static inline unsigned long hweight_long(unsigned long w)
|
|
|
{
|