|
@@ -171,6 +171,8 @@ void sbitmap_resize(struct sbitmap *sb, unsigned int depth);
|
|
* starting from the last allocated bit. This is less efficient
|
|
* starting from the last allocated bit. This is less efficient
|
|
* than the default behavior (false).
|
|
* than the default behavior (false).
|
|
*
|
|
*
|
|
|
|
+ * This operation provides acquire barrier semantics if it succeeds.
|
|
|
|
+ *
|
|
* Return: Non-negative allocated bit number if successful, -1 otherwise.
|
|
* Return: Non-negative allocated bit number if successful, -1 otherwise.
|
|
*/
|
|
*/
|
|
int sbitmap_get(struct sbitmap *sb, unsigned int alloc_hint, bool round_robin);
|
|
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)
|
|
clear_bit(SB_NR_TO_BIT(sb, bitnr), __sbitmap_word(sb, bitnr));
|
|
clear_bit(SB_NR_TO_BIT(sb, bitnr), __sbitmap_word(sb, bitnr));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static inline void sbitmap_clear_bit_unlock(struct sbitmap *sb,
|
|
|
|
+ unsigned int bitnr)
|
|
|
|
+{
|
|
|
|
+ clear_bit_unlock(SB_NR_TO_BIT(sb, bitnr), __sbitmap_word(sb, bitnr));
|
|
|
|
+}
|
|
|
|
+
|
|
static inline int sbitmap_test_bit(struct sbitmap *sb, unsigned int bitnr)
|
|
static inline int sbitmap_test_bit(struct sbitmap *sb, unsigned int bitnr)
|
|
{
|
|
{
|
|
return test_bit(SB_NR_TO_BIT(sb, bitnr), __sbitmap_word(sb, bitnr));
|
|
return test_bit(SB_NR_TO_BIT(sb, bitnr), __sbitmap_word(sb, bitnr));
|