Lines Matching +full:flags +full:- +full:mask
6 * Copyright (c) 1994-1997, 99, 2000, 06, 07 Ralf Baechle (ralf@linux-mips.org)
16 * __mips_set_bit - Atomically set a bit in memory. This is called by
25 unsigned long mask; in __mips_set_bit() local
26 unsigned long flags; in __mips_set_bit() local
28 mask = 1UL << bit; in __mips_set_bit()
29 raw_local_irq_save(flags); in __mips_set_bit()
30 *a |= mask; in __mips_set_bit()
31 raw_local_irq_restore(flags); in __mips_set_bit()
37 * __mips_clear_bit - Clears a bit in memory. This is called by clear_bit() if
46 unsigned long mask; in __mips_clear_bit() local
47 unsigned long flags; in __mips_clear_bit() local
49 mask = 1UL << bit; in __mips_clear_bit()
50 raw_local_irq_save(flags); in __mips_clear_bit()
51 *a &= ~mask; in __mips_clear_bit()
52 raw_local_irq_restore(flags); in __mips_clear_bit()
58 * __mips_change_bit - Toggle a bit in memory. This is called by change_bit()
67 unsigned long mask; in __mips_change_bit() local
68 unsigned long flags; in __mips_change_bit() local
70 mask = 1UL << bit; in __mips_change_bit()
71 raw_local_irq_save(flags); in __mips_change_bit()
72 *a ^= mask; in __mips_change_bit()
73 raw_local_irq_restore(flags); in __mips_change_bit()
79 * __mips_test_and_set_bit_lock - Set a bit and return its old value. This is
89 unsigned long mask; in __mips_test_and_set_bit_lock() local
90 unsigned long flags; in __mips_test_and_set_bit_lock() local
93 mask = 1UL << bit; in __mips_test_and_set_bit_lock()
94 raw_local_irq_save(flags); in __mips_test_and_set_bit_lock()
95 res = (mask & *a) != 0; in __mips_test_and_set_bit_lock()
96 *a |= mask; in __mips_test_and_set_bit_lock()
97 raw_local_irq_restore(flags); in __mips_test_and_set_bit_lock()
104 * __mips_test_and_clear_bit - Clear a bit and return its old value. This is
113 unsigned long mask; in __mips_test_and_clear_bit() local
114 unsigned long flags; in __mips_test_and_clear_bit() local
117 mask = 1UL << bit; in __mips_test_and_clear_bit()
118 raw_local_irq_save(flags); in __mips_test_and_clear_bit()
119 res = (mask & *a) != 0; in __mips_test_and_clear_bit()
120 *a &= ~mask; in __mips_test_and_clear_bit()
121 raw_local_irq_restore(flags); in __mips_test_and_clear_bit()
128 * __mips_test_and_change_bit - Change a bit and return its old value. This is
137 unsigned long mask; in __mips_test_and_change_bit() local
138 unsigned long flags; in __mips_test_and_change_bit() local
141 mask = 1UL << bit; in __mips_test_and_change_bit()
142 raw_local_irq_save(flags); in __mips_test_and_change_bit()
143 res = (mask & *a) != 0; in __mips_test_and_change_bit()
144 *a ^= mask; in __mips_test_and_change_bit()
145 raw_local_irq_restore(flags); in __mips_test_and_change_bit()