Lines Matching defs:bit
81 * set_bit - Atomically set a bit in memory
82 * @nr: the bit to set
93 int bit = nr % BITS_PER_LONG;
100 if ((MIPS_ISA_REV >= 2) && __builtin_constant_p(bit) && (bit >= 16)) {
101 __bit_op(*m, __INS "%0, %3, %2, 1", "i"(bit), "r"(~0));
105 __bit_op(*m, "or\t%0, %2", "ir"(BIT(bit)));
109 * clear_bit - Clears a bit in memory
121 int bit = nr % BITS_PER_LONG;
128 if ((MIPS_ISA_REV >= 2) && __builtin_constant_p(bit)) {
129 __bit_op(*m, __INS "%0, $0, %2, 1", "i"(bit));
133 __bit_op(*m, "and\t%0, %2", "ir"(~BIT(bit)));
137 * clear_bit_unlock - Clears a bit in memory
151 * change_bit - Toggle a bit in memory
162 int bit = nr % BITS_PER_LONG;
169 __bit_op(*m, "xor\t%0, %2", "ir"(BIT(bit)));
173 * test_and_set_bit_lock - Set a bit and return its old value
184 int bit = nr % BITS_PER_LONG;
192 "ir"(BIT(bit)));
193 res = (orig & BIT(bit)) != 0;
202 * test_and_set_bit - Set a bit and return its old value
217 * test_and_clear_bit - Clear a bit and return its old value
228 int bit = nr % BITS_PER_LONG;
239 "i"(bit));
244 "ir"(BIT(bit)));
245 res = (orig & BIT(bit)) != 0;
254 * test_and_change_bit - Change a bit and return its old value
265 int bit = nr % BITS_PER_LONG;
275 "ir"(BIT(bit)));
276 res = (orig & BIT(bit)) != 0;
290 * __clear_bit_unlock - Clears a bit in memory
306 * Return the bit position (0..63) of the most significant 1 bit in a word
307 * Returns -1 if no 1 bit exists
369 * __ffs - find first bit in word.
373 * Undefined if no bit exists, so code should check against 0 first.
381 * fls - find last bit set.
433 * ffs - find first bit set.