Lines Matching defs:bit
79 * set_bit - Atomically set a bit in memory
80 * @nr: the bit to set
91 int bit = nr % BITS_PER_LONG;
98 if ((MIPS_ISA_REV >= 2) && __builtin_constant_p(bit) && (bit >= 16)) {
99 __bit_op(*m, __stringify(LONG_INS) " %0, %3, %2, 1", "i"(bit), "r"(~0));
103 __bit_op(*m, "or\t%0, %2", "ir"(BIT(bit)));
107 * clear_bit - Clears a bit in memory
119 int bit = nr % BITS_PER_LONG;
126 if ((MIPS_ISA_REV >= 2) && __builtin_constant_p(bit)) {
127 __bit_op(*m, __stringify(LONG_INS) " %0, $0, %2, 1", "i"(bit));
131 __bit_op(*m, "and\t%0, %2", "ir"(~BIT(bit)));
135 * clear_bit_unlock - Clears a bit in memory
149 * change_bit - Toggle a bit in memory
160 int bit = nr % BITS_PER_LONG;
167 __bit_op(*m, "xor\t%0, %2", "ir"(BIT(bit)));
171 * test_and_set_bit_lock - Set a bit and return its old value
182 int bit = nr % BITS_PER_LONG;
190 "ir"(BIT(bit)));
191 res = (orig & BIT(bit)) != 0;
200 * test_and_set_bit - Set a bit and return its old value
215 * test_and_clear_bit - Clear a bit and return its old value
226 int bit = nr % BITS_PER_LONG;
237 "i"(bit));
242 "ir"(BIT(bit)));
243 res = (orig & BIT(bit)) != 0;
252 * test_and_change_bit - Change a bit and return its old value
263 int bit = nr % BITS_PER_LONG;
273 "ir"(BIT(bit)));
274 res = (orig & BIT(bit)) != 0;
288 * __clear_bit_unlock - Clears a bit in memory
304 * Return the bit position (0..63) of the most significant 1 bit in a word
305 * Returns -1 if no 1 bit exists
367 * __ffs - find first bit in word.
371 * Undefined if no bit exists, so code should check against 0 first.
379 * fls - find last bit set.
431 * ffs - find first bit set.