find.h 965 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef _TOOLS_LINUX_ASM_GENERIC_BITOPS_FIND_H_
  2. #define _TOOLS_LINUX_ASM_GENERIC_BITOPS_FIND_H_
  3. #ifndef find_next_bit
  4. /**
  5. * find_next_bit - find the next set bit in a memory region
  6. * @addr: The address to base the search on
  7. * @offset: The bitnumber to start searching at
  8. * @size: The bitmap size in bits
  9. *
  10. * Returns the bit number for the next set bit
  11. * If no bits are set, returns @size.
  12. */
  13. extern unsigned long find_next_bit(const unsigned long *addr, unsigned long
  14. size, unsigned long offset);
  15. #endif
  16. #ifndef find_first_bit
  17. /**
  18. * find_first_bit - find the first set bit in a memory region
  19. * @addr: The address to start the search at
  20. * @size: The maximum number of bits to search
  21. *
  22. * Returns the bit number of the first set bit.
  23. * If no bits are set, returns @size.
  24. */
  25. extern unsigned long find_first_bit(const unsigned long *addr,
  26. unsigned long size);
  27. #endif /* find_first_bit */
  28. #endif /*_TOOLS_LINUX_ASM_GENERIC_BITOPS_FIND_H_ */