Lines Matching refs:bit
363 * Test a bit value.
365 static inline int test_bit(__u8 *bitmap, unsigned int bit)
367 return bitmap[bit >> 3] & (1U << (bit & 0x7));
371 * Set a bit.
373 static inline void set_bit(__u8 *bitmap, unsigned int bit)
375 bitmap[bit >> 3] |= 1U << (bit & 0x7);
379 * Clear a bit.
381 static inline void clear_bit(__u8 *bitmap, unsigned int bit)
383 bitmap[bit >> 3] &= ~(1U << (bit & 0x7));
387 * Find the first zero bit in a bitmap of size nr_bits.
388 * If no zero bit is found, return -1.
393 unsigned int i, j, bit, count = (nr_bits + 63) >> 6;
400 bit = i << 6;
401 for (j = bit; j < nr_bits; j++) {