Lines Matching refs:start_bit
37 xfs_contig_bits(uint *map, uint size, uint start_bit) in xfs_contig_bits() argument
39 uint * p = ((unsigned int *) map) + (start_bit >> BIT_TO_WORD_SHIFT); in xfs_contig_bits()
45 ASSERT(start_bit < size); in xfs_contig_bits()
46 size -= start_bit & ~(NBWORD - 1); in xfs_contig_bits()
47 start_bit &= (NBWORD - 1); in xfs_contig_bits()
48 if (start_bit) { in xfs_contig_bits()
51 tmp |= (~0U >> (NBWORD-start_bit)); in xfs_contig_bits()
63 return result - start_bit; in xfs_contig_bits()
65 return result + ffz(tmp) - start_bit; in xfs_contig_bits()
76 int xfs_next_bit(uint *map, uint size, uint start_bit) in xfs_next_bit() argument
78 uint * p = ((unsigned int *) map) + (start_bit >> BIT_TO_WORD_SHIFT); in xfs_next_bit()
79 uint result = start_bit & ~(NBWORD - 1); in xfs_next_bit()
84 if (start_bit >= size) in xfs_next_bit()
87 start_bit &= (NBWORD - 1); in xfs_next_bit()
88 if (start_bit) { in xfs_next_bit()
91 tmp &= (~0U << start_bit); in xfs_next_bit()