bitops.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef __ASM_GENERIC_BITOPS_H
  2. #define __ASM_GENERIC_BITOPS_H
  3. /*
  4. * For the benefit of those who are trying to port Linux to another
  5. * architecture, here are some C-language equivalents. You should
  6. * recode these in the native assembly language, if at all possible.
  7. *
  8. * C language equivalents written by Theodore Ts'o, 9/26/92
  9. */
  10. #include <linux/irqflags.h>
  11. #include <linux/compiler.h>
  12. /*
  13. * clear_bit may not imply a memory barrier
  14. */
  15. #ifndef smp_mb__before_clear_bit
  16. #define smp_mb__before_clear_bit() smp_mb()
  17. #define smp_mb__after_clear_bit() smp_mb()
  18. #endif
  19. #include <asm-generic/bitops/__ffs.h>
  20. #include <asm-generic/bitops/ffz.h>
  21. #include <asm-generic/bitops/fls.h>
  22. #include <asm-generic/bitops/__fls.h>
  23. #include <asm-generic/bitops/fls64.h>
  24. #include <asm-generic/bitops/find.h>
  25. #ifndef _LINUX_BITOPS_H
  26. #error only <linux/bitops.h> can be included directly
  27. #endif
  28. #include <asm-generic/bitops/sched.h>
  29. #include <asm-generic/bitops/ffs.h>
  30. #include <asm-generic/bitops/hweight.h>
  31. #include <asm-generic/bitops/lock.h>
  32. #include <asm-generic/bitops/atomic.h>
  33. #include <asm-generic/bitops/non-atomic.h>
  34. #include <asm-generic/bitops/le.h>
  35. #include <asm-generic/bitops/ext2-atomic.h>
  36. #endif /* __ASM_GENERIC_BITOPS_H */