diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-12-15 17:50:12 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-12-17 09:14:48 -0500 |
commit | 23e1a358e81017759714cb413a0e930d4f892563 (patch) | |
tree | 6ad2a1c06e8b968c869e3f16a82cbbe8ce3ec502 /tools/include | |
parent | 93c49b3e535659102aa1ca28b775b48e3594036c (diff) |
tools lib: Move asm-generic/bitops/find.h code to tools/include and tools/lib
To match the Linux kernel source code structure from where this code came from.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-fkbma1h04ki0zzdmp0dpgfyy@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/include')
-rw-r--r-- | tools/include/asm-generic/bitops/find.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tools/include/asm-generic/bitops/find.h b/tools/include/asm-generic/bitops/find.h new file mode 100644 index 000000000000..31f51547fcd4 --- /dev/null +++ b/tools/include/asm-generic/bitops/find.h | |||
@@ -0,0 +1,33 @@ | |||
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 | */ | ||
14 | extern unsigned long find_next_bit(const unsigned long *addr, unsigned long | ||
15 | size, unsigned long offset); | ||
16 | #endif | ||
17 | |||
18 | #ifndef find_first_bit | ||
19 | |||
20 | /** | ||
21 | * find_first_bit - find the first set bit in a memory region | ||
22 | * @addr: The address to start the search at | ||
23 | * @size: The maximum number of bits to search | ||
24 | * | ||
25 | * Returns the bit number of the first set bit. | ||
26 | * If no bits are set, returns @size. | ||
27 | */ | ||
28 | extern unsigned long find_first_bit(const unsigned long *addr, | ||
29 | unsigned long size); | ||
30 | |||
31 | #endif /* find_first_bit */ | ||
32 | |||
33 | #endif /*_TOOLS_LINUX_ASM_GENERIC_BITOPS_FIND_H_ */ | ||