bitops_64.h 830 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef _X86_64_BITOPS_H
  2. #define _X86_64_BITOPS_H
  3. /*
  4. * Copyright 1992, Linus Torvalds.
  5. */
  6. static inline void set_bit_string(unsigned long *bitmap, unsigned long i,
  7. int len)
  8. {
  9. unsigned long end = i + len;
  10. while (i < end) {
  11. __set_bit(i, bitmap);
  12. i++;
  13. }
  14. }
  15. #ifdef __KERNEL__
  16. #include <asm-generic/bitops/sched.h>
  17. #define ARCH_HAS_FAST_MULTIPLIER 1
  18. #include <asm-generic/bitops/hweight.h>
  19. #endif /* __KERNEL__ */
  20. #include <asm-generic/bitops/fls64.h>
  21. #ifdef __KERNEL__
  22. #include <asm-generic/bitops/ext2-non-atomic.h>
  23. #define ext2_set_bit_atomic(lock, nr, addr) \
  24. test_and_set_bit((nr), (unsigned long *)(addr))
  25. #define ext2_clear_bit_atomic(lock, nr, addr) \
  26. test_and_clear_bit((nr), (unsigned long *)(addr))
  27. #include <asm-generic/bitops/minix.h>
  28. #endif /* __KERNEL__ */
  29. #endif /* _X86_64_BITOPS_H */