*参照元 [#zf94766c] #backlinks *説明 [#be1270fa] -パス: [[linux-4.4.1/lib/bitmap.c]] -FIXME: これは何? --説明 **引数 [#xcb8c4fd] -unsigned long *map -- -unsigned long size -- -unsigned long start -- -unsigned int nr -- -unsigned long align_mask -- -unsigned long align_offset -- **返り値 [#a0d51e9d] -unsigned long -- **参考 [#mbba3264] *実装 [#g9161992] /** * bitmap_find_next_zero_area_off - find a contiguous aligned zero area * @map: The address to base the search on * @size: The bitmap size in bits * @start: The bitnumber to start searching at * @nr: The number of zeroed bits we're looking for * @align_mask: Alignment mask for zero area * @align_offset: Alignment offset for zero area. * * The @align_mask should be one less than a power of 2; the effect is that * the bit offset of all zero areas this function finds plus @align_offset * is multiple of that power of 2. */ unsigned long bitmap_find_next_zero_area_off(unsigned long *map, unsigned long size, unsigned long start, unsigned int nr, unsigned long align_mask, unsigned long align_offset) { unsigned long index, end, i; again: index = find_next_zero_bit(map, size, start); - --[[linux-4.4.1/find_next_zero_bit()]] /* Align allocation */ index = __ALIGN_MASK(index + align_offset, align_mask) - align_offset; - --[[linux-4.4.1/__ALIGN_MASK()]] end = index + nr; if (end > size) return end; i = find_next_bit(map, end, index); if (i < end) { start = i + 1; goto again; } - --[[linux-4.4.1/find_next_bit()]] return index; } EXPORT_SYMBOL(bitmap_find_next_zero_area_off); -ライセンスに関係なくシンボルを公開する。 --[[linux-4.4.1/EXPORT_SYMBOL()]] *コメント [#h6b4b8ab]