Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1#ifndef _TOOLS_LINUX_ASM_GENERIC_BITOPS_FIND_H_
2#define _TOOLS_LINUX_ASM_GENERIC_BITOPS_FIND_H_
3
4#ifndef find_next_bit
5/**
6 * find_next_bit - find the next set bit in a memory region
7 * @addr: The address to base the search on
8 * @offset: The bitnumber to start searching at
9 * @size: The bitmap size in bits
10 *
11 * Returns the bit number for the next set bit
12 * If no bits are set, returns @size.
13 */
14extern unsigned long find_next_bit(const unsigned long *addr, unsigned long
15 size, unsigned long offset);
16#endif
17
18#ifndef find_next_zero_bit
19
20/**
21 * find_next_zero_bit - find the next cleared bit in a memory region
22 * @addr: The address to base the search on
23 * @offset: The bitnumber to start searching at
24 * @size: The bitmap size in bits
25 *
26 * Returns the bit number of the next zero bit
27 * If no bits are zero, returns @size.
28 */
29unsigned long find_next_zero_bit(const unsigned long *addr, unsigned long size,
30 unsigned long offset);
31#endif
32
33#ifndef find_first_bit
34
35/**
36 * find_first_bit - find the first set bit in a memory region
37 * @addr: The address to start the search at
38 * @size: The maximum number of bits to search
39 *
40 * Returns the bit number of the first set bit.
41 * If no bits are set, returns @size.
42 */
43extern unsigned long find_first_bit(const unsigned long *addr,
44 unsigned long size);
45
46#endif /* find_first_bit */
47
48#ifndef find_first_zero_bit
49
50/**
51 * find_first_zero_bit - find the first cleared bit in a memory region
52 * @addr: The address to start the search at
53 * @size: The maximum number of bits to search
54 *
55 * Returns the bit number of the first cleared bit.
56 * If no bits are zero, returns @size.
57 */
58unsigned long find_first_zero_bit(const unsigned long *addr, unsigned long size);
59#endif
60
61#endif /*_TOOLS_LINUX_ASM_GENERIC_BITOPS_FIND_H_ */