Lines Matching refs:binfo
9 bitmap_info_init(bitmap_info_t *binfo, size_t nbits) in bitmap_info_init() argument
22 binfo->levels[0].group_offset = 0; in bitmap_info_init()
26 binfo->levels[i].group_offset = binfo->levels[i-1].group_offset in bitmap_info_init()
30 binfo->levels[i].group_offset = binfo->levels[i-1].group_offset in bitmap_info_init()
32 assert(binfo->levels[i].group_offset <= BITMAP_GROUPS_MAX); in bitmap_info_init()
33 binfo->nlevels = i; in bitmap_info_init()
34 binfo->nbits = nbits; in bitmap_info_init()
38 bitmap_info_ngroups(const bitmap_info_t *binfo) in bitmap_info_ngroups() argument
41 return (binfo->levels[binfo->nlevels].group_offset); in bitmap_info_ngroups()
45 bitmap_init(bitmap_t *bitmap, const bitmap_info_t *binfo) in bitmap_init() argument
57 memset(bitmap, 0xffU, bitmap_size(binfo)); in bitmap_init()
58 extra = (BITMAP_GROUP_NBITS - (binfo->nbits & BITMAP_GROUP_NBITS_MASK)) in bitmap_init()
61 bitmap[binfo->levels[1].group_offset - 1] >>= extra; in bitmap_init()
62 for (i = 1; i < binfo->nlevels; i++) { in bitmap_init()
63 size_t group_count = binfo->levels[i].group_offset - in bitmap_init()
64 binfo->levels[i-1].group_offset; in bitmap_init()
68 bitmap[binfo->levels[i+1].group_offset - 1] >>= extra; in bitmap_init()
75 bitmap_info_init(bitmap_info_t *binfo, size_t nbits) in bitmap_info_init() argument
81 binfo->ngroups = BITMAP_BITS2GROUPS(nbits); in bitmap_info_init()
82 binfo->nbits = nbits; in bitmap_info_init()
86 bitmap_info_ngroups(const bitmap_info_t *binfo) in bitmap_info_ngroups() argument
89 return (binfo->ngroups); in bitmap_info_ngroups()
93 bitmap_init(bitmap_t *bitmap, const bitmap_info_t *binfo) in bitmap_init() argument
97 memset(bitmap, 0xffU, bitmap_size(binfo)); in bitmap_init()
98 extra = (BITMAP_GROUP_NBITS - (binfo->nbits & BITMAP_GROUP_NBITS_MASK)) in bitmap_init()
101 bitmap[binfo->ngroups - 1] >>= extra; in bitmap_init()
107 bitmap_size(const bitmap_info_t *binfo) in bitmap_size() argument
110 return (bitmap_info_ngroups(binfo) << LG_SIZEOF_BITMAP); in bitmap_size()