I found these functions only by chance although I was looking exactly for something like them. So, add them to the list of functions to make them more visible.
Unified · Split
| @@ -51,6 +51,12 @@ · 50 unmodified lines | |||
| 51 | * bitmap_clear(dst, pos, nbits) Clear specified bit area | 51 | * bitmap_clear(dst, pos, nbits) Clear specified bit area |
| 52 | * bitmap_find_next_zero_area(buf, len, pos, n, mask) Find bit free area | 52 | * bitmap_find_next_zero_area(buf, len, pos, n, mask) Find bit free area |
| 53 | * bitmap_find_next_zero_area_off(buf, len, pos, n, mask, mask_off) as above | 53 | * bitmap_find_next_zero_area_off(buf, len, pos, n, mask, mask_off) as above |
| 54 | * bitmap_next_clear_region(map, &start, &end, nbits) Find next clear region | ||
| 55 | * bitmap_next_set_region(map, &start, &end, nbits) Find next set region | ||
| 56 | * bitmap_for_each_clear_region(map, rs, re, start, end) | ||
| 57 | * Iterate over all clear regions | ||
| 58 | * bitmap_for_each_set_region(map, rs, re, start, end) | ||
| 59 | * Iterate over all set regions | ||
| 54 | * bitmap_shift_right(dst, src, n, nbits) *dst = *src >> n | 60 | * bitmap_shift_right(dst, src, n, nbits) *dst = *src >> n |
| 55 | * bitmap_shift_left(dst, src, n, nbits) *dst = *src << n | 61 | * bitmap_shift_left(dst, src, n, nbits) *dst = *src << n |
| 56 | * bitmap_cut(dst, src, first, n, nbits) Cut n bits from first, copy rest | 62 | * bitmap_cut(dst, src, first, n, nbits) Cut n bits from first, copy rest |