Path: blob/master/include/asm-generic/bitops/find.h
10818 views
#ifndef _ASM_GENERIC_BITOPS_FIND_H_1#define _ASM_GENERIC_BITOPS_FIND_H_23#ifndef find_next_bit4/**5* find_next_bit - find the next set bit in a memory region6* @addr: The address to base the search on7* @offset: The bitnumber to start searching at8* @size: The bitmap size in bits9*/10extern unsigned long find_next_bit(const unsigned long *addr, unsigned long11size, unsigned long offset);12#endif1314#ifndef find_next_zero_bit15/**16* find_next_zero_bit - find the next cleared bit in a memory region17* @addr: The address to base the search on18* @offset: The bitnumber to start searching at19* @size: The bitmap size in bits20*/21extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned22long size, unsigned long offset);23#endif2425#ifdef CONFIG_GENERIC_FIND_FIRST_BIT2627/**28* find_first_bit - find the first set bit in a memory region29* @addr: The address to start the search at30* @size: The maximum size to search31*32* Returns the bit number of the first set bit.33*/34extern unsigned long find_first_bit(const unsigned long *addr,35unsigned long size);3637/**38* find_first_zero_bit - find the first cleared bit in a memory region39* @addr: The address to start the search at40* @size: The maximum size to search41*42* Returns the bit number of the first cleared bit.43*/44extern unsigned long find_first_zero_bit(const unsigned long *addr,45unsigned long size);46#else /* CONFIG_GENERIC_FIND_FIRST_BIT */4748#define find_first_bit(addr, size) find_next_bit((addr), (size), 0)49#define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0)5051#endif /* CONFIG_GENERIC_FIND_FIRST_BIT */5253#endif /*_ASM_GENERIC_BITOPS_FIND_H_ */545556