Lines Matching refs:nbits
33 bool are_bits_clear(const ulong *lmap, size_t bit, size_t nbits) in are_bits_clear() argument
39 if (8 - pos >= nbits) in are_bits_clear()
40 return !nbits || !(*map & fill_mask[pos + nbits] & in are_bits_clear()
45 nbits -= 8 - pos; in are_bits_clear()
51 if (nbits >= pos * 8) { in are_bits_clear()
52 for (nbits -= pos * 8; pos; pos--, map++) { in are_bits_clear()
59 for (pos = nbits / BITS_IN_SIZE_T; pos; pos--, map += sizeof(size_t)) { in are_bits_clear()
64 for (pos = (nbits % BITS_IN_SIZE_T) >> 3; pos; pos--, map++) { in are_bits_clear()
69 pos = nbits & 7; in are_bits_clear()
81 bool are_bits_set(const ulong *lmap, size_t bit, size_t nbits) in are_bits_set() argument
88 if (8 - pos >= nbits) { in are_bits_set()
89 mask = fill_mask[pos + nbits] & zero_mask[pos]; in are_bits_set()
90 return !nbits || (*map & mask) == mask; in are_bits_set()
96 nbits -= 8 - pos; in are_bits_set()
102 if (nbits >= pos * 8) { in are_bits_set()
103 for (nbits -= pos * 8; pos; pos--, map++) { in are_bits_set()
110 for (pos = nbits / BITS_IN_SIZE_T; pos; pos--, map += sizeof(size_t)) { in are_bits_set()
115 for (pos = (nbits % BITS_IN_SIZE_T) >> 3; pos; pos--, map++) { in are_bits_set()
120 pos = nbits & 7; in are_bits_set()