diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-31 18:42:19 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-31 18:42:19 -0500 |
commit | ab53d472e785e51fdfc08fc1d66252c1153e6c0f (patch) | |
tree | 19abab13d2e4e8fe00f960c0ac475e14bfb1a44e /include/linux | |
parent | 0db5d3d2f58804edb394e8008c7d9744110338a2 (diff) |
bitmap: find_last_bit()
Impact: New API
As the name suggests. For the moment everyone uses the generic one.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/bitops.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 024f2b027244..61829139795a 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
@@ -134,9 +134,20 @@ extern unsigned long find_first_bit(const unsigned long *addr, | |||
134 | */ | 134 | */ |
135 | extern unsigned long find_first_zero_bit(const unsigned long *addr, | 135 | extern unsigned long find_first_zero_bit(const unsigned long *addr, |
136 | unsigned long size); | 136 | unsigned long size); |
137 | |||
138 | #endif /* CONFIG_GENERIC_FIND_FIRST_BIT */ | 137 | #endif /* CONFIG_GENERIC_FIND_FIRST_BIT */ |
139 | 138 | ||
139 | #ifdef CONFIG_GENERIC_FIND_LAST_BIT | ||
140 | /** | ||
141 | * find_last_bit - find the last set bit in a memory region | ||
142 | * @addr: The address to start the search at | ||
143 | * @size: The maximum size to search | ||
144 | * | ||
145 | * Returns the bit number of the first set bit, or size. | ||
146 | */ | ||
147 | extern unsigned long find_last_bit(const unsigned long *addr, | ||
148 | unsigned long size); | ||
149 | #endif /* CONFIG_GENERIC_FIND_LAST_BIT */ | ||
150 | |||
140 | #ifdef CONFIG_GENERIC_FIND_NEXT_BIT | 151 | #ifdef CONFIG_GENERIC_FIND_NEXT_BIT |
141 | 152 | ||
142 | /** | 153 | /** |