Home | History | Annotate | Download | only in utils

Lines Matching refs:bit

40 void bitfield_set(struct bitfield *bf, size_t bit)
42 if (bit >= bf->max_bits)
44 bf->bits[bit / 8] |= BIT(bit % 8);
48 void bitfield_clear(struct bitfield *bf, size_t bit)
50 if (bit >= bf->max_bits)
52 bf->bits[bit / 8] &= ~BIT(bit % 8);
56 int bitfield_is_set(struct bitfield *bf, size_t bit)
58 if (bit >= bf->max_bits)
60 return !!(bf->bits[bit / 8] & BIT(bit % 8));