Lines Matching +full:com +full:- +full:offset

3  * Written by David Howells (dhowells@redhat.com)
5 * Written by Rusty Russell <rusty@rustcorp.com.au>
21 unsigned long offset) in find_next_bit() argument
23 const unsigned long *p = addr + BIT_WORD(offset); in find_next_bit()
24 unsigned long result = offset & ~(BITS_PER_LONG-1); in find_next_bit()
27 if (offset >= size) { in find_next_bit()
30 size -= result; in find_next_bit()
31 offset %= BITS_PER_LONG; in find_next_bit()
32 if (offset) { in find_next_bit()
34 tmp &= (~0UL << offset); in find_next_bit()
41 size -= BITS_PER_LONG; in find_next_bit()
58 size -= 4*BITS_PER_LONG; in find_next_bit()
65 size -= BITS_PER_LONG; in find_next_bit()
73 tmp &= (~0UL >> (BITS_PER_LONG - size)); in find_next_bit()
83 * Linus' asm-alpha/bitops.h.
86 unsigned long offset) in find_next_zero_bit() argument
88 const unsigned long *p = addr + BIT_WORD(offset); in find_next_zero_bit()
89 unsigned long result = offset & ~(BITS_PER_LONG-1); in find_next_zero_bit()
92 if (offset >= size) { in find_next_zero_bit()
95 size -= result; in find_next_zero_bit()
96 offset %= BITS_PER_LONG; in find_next_zero_bit()
97 if (offset) { in find_next_zero_bit()
99 tmp |= ~0UL >> (BITS_PER_LONG - offset); in find_next_zero_bit()
106 size -= BITS_PER_LONG; in find_next_zero_bit()
109 while (size & ~(BITS_PER_LONG-1)) { in find_next_zero_bit()
114 size -= BITS_PER_LONG; in find_next_zero_bit()
139 if (size & (BITS_PER_LONG-1)) { in find_last_bit()
141 - (size & (BITS_PER_LONG-1))))); in find_last_bit()
148 tmp = addr[--words]; in find_last_bit()
151 return words * BITS_PER_LONG + BITS_PER_LONG - 1 - clzl(tmp); in find_last_bit()