Lines Matching +full:non +full:- +full:empty
1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
11 * XFS bit manipulation routines, used in non-realtime code.
15 * Return whether bitmap is empty.
17 * Returns 1 for empty, 0 for non-empty.
46 size -= start_bit & ~(NBWORD - 1); in xfs_contig_bits()
47 start_bit &= (NBWORD - 1); in xfs_contig_bits()
51 tmp |= (~0U >> (NBWORD-start_bit)); in xfs_contig_bits()
55 size -= NBWORD; in xfs_contig_bits()
61 size -= NBWORD; in xfs_contig_bits()
63 return result - start_bit; in xfs_contig_bits()
65 return result + ffz(tmp) - start_bit; in xfs_contig_bits()
70 * returns the next set bit from there. It returns -1
79 uint result = start_bit & ~(NBWORD - 1); in xfs_next_bit()
85 return -1; in xfs_next_bit()
86 size -= result; in xfs_next_bit()
87 start_bit &= (NBWORD - 1); in xfs_next_bit()
95 size -= NBWORD; in xfs_next_bit()
101 size -= NBWORD; in xfs_next_bit()
103 return -1; in xfs_next_bit()
105 return result + ffs(tmp) - 1; in xfs_next_bit()