diff options
Diffstat (limited to 'include/linux/sbitmap.h')
-rw-r--r-- | include/linux/sbitmap.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/sbitmap.h b/include/linux/sbitmap.h index 0dcc60e820de..841585f6e5f2 100644 --- a/include/linux/sbitmap.h +++ b/include/linux/sbitmap.h | |||
@@ -171,6 +171,8 @@ void sbitmap_resize(struct sbitmap *sb, unsigned int depth); | |||
171 | * starting from the last allocated bit. This is less efficient | 171 | * starting from the last allocated bit. This is less efficient |
172 | * than the default behavior (false). | 172 | * than the default behavior (false). |
173 | * | 173 | * |
174 | * This operation provides acquire barrier semantics if it succeeds. | ||
175 | * | ||
174 | * Return: Non-negative allocated bit number if successful, -1 otherwise. | 176 | * Return: Non-negative allocated bit number if successful, -1 otherwise. |
175 | */ | 177 | */ |
176 | int sbitmap_get(struct sbitmap *sb, unsigned int alloc_hint, bool round_robin); | 178 | int sbitmap_get(struct sbitmap *sb, unsigned int alloc_hint, bool round_robin); |
@@ -300,6 +302,12 @@ static inline void sbitmap_clear_bit(struct sbitmap *sb, unsigned int bitnr) | |||
300 | clear_bit(SB_NR_TO_BIT(sb, bitnr), __sbitmap_word(sb, bitnr)); | 302 | clear_bit(SB_NR_TO_BIT(sb, bitnr), __sbitmap_word(sb, bitnr)); |
301 | } | 303 | } |
302 | 304 | ||
305 | static inline void sbitmap_clear_bit_unlock(struct sbitmap *sb, | ||
306 | unsigned int bitnr) | ||
307 | { | ||
308 | clear_bit_unlock(SB_NR_TO_BIT(sb, bitnr), __sbitmap_word(sb, bitnr)); | ||
309 | } | ||
310 | |||
303 | static inline int sbitmap_test_bit(struct sbitmap *sb, unsigned int bitnr) | 311 | static inline int sbitmap_test_bit(struct sbitmap *sb, unsigned int bitnr) |
304 | { | 312 | { |
305 | return test_bit(SB_NR_TO_BIT(sb, bitnr), __sbitmap_word(sb, bitnr)); | 313 | return test_bit(SB_NR_TO_BIT(sb, bitnr), __sbitmap_word(sb, bitnr)); |