Lines Matching +full:flags +full:- +full:mask
16 …ne ATOMIC_HASH(a) (&(__atomic_hash[ (((unsigned long) a)/L1_CACHE_BYTES) & (ATOMIC_HASH_SIZE-1) ]))
51 * set_bit - Atomically set a bit in memory
63 * restricted to acting on a single-word quantity.
67 unsigned long mask = BIT_MASK(nr); in set_bit() local
69 unsigned long flags; in set_bit() local
71 _atomic_spin_lock_irqsave(p, flags); in set_bit()
72 *p |= mask; in set_bit()
73 _atomic_spin_unlock_irqrestore(p, flags); in set_bit()
77 * clear_bit - Clears a bit in memory
88 unsigned long mask = BIT_MASK(nr); in clear_bit() local
90 unsigned long flags; in clear_bit() local
92 _atomic_spin_lock_irqsave(p, flags); in clear_bit()
93 *p &= ~mask; in clear_bit()
94 _atomic_spin_unlock_irqrestore(p, flags); in clear_bit()
98 * change_bit - Toggle a bit in memory
105 * restricted to acting on a single-word quantity.
109 unsigned long mask = BIT_MASK(nr); in change_bit() local
111 unsigned long flags; in change_bit() local
113 _atomic_spin_lock_irqsave(p, flags); in change_bit()
114 *p ^= mask; in change_bit()
115 _atomic_spin_unlock_irqrestore(p, flags); in change_bit()
119 * test_and_set_bit - Set a bit and return its old value
129 unsigned long mask = BIT_MASK(nr); in test_and_set_bit() local
132 unsigned long flags; in test_and_set_bit() local
134 _atomic_spin_lock_irqsave(p, flags); in test_and_set_bit()
136 *p = old | mask; in test_and_set_bit()
137 _atomic_spin_unlock_irqrestore(p, flags); in test_and_set_bit()
139 return (old & mask) != 0; in test_and_set_bit()
143 * test_and_clear_bit - Clear a bit and return its old value
153 unsigned long mask = BIT_MASK(nr); in test_and_clear_bit() local
156 unsigned long flags; in test_and_clear_bit() local
158 _atomic_spin_lock_irqsave(p, flags); in test_and_clear_bit()
160 *p = old & ~mask; in test_and_clear_bit()
161 _atomic_spin_unlock_irqrestore(p, flags); in test_and_clear_bit()
163 return (old & mask) != 0; in test_and_clear_bit()
167 * test_and_change_bit - Change a bit and return its old value
176 unsigned long mask = BIT_MASK(nr); in test_and_change_bit() local
179 unsigned long flags; in test_and_change_bit() local
181 _atomic_spin_lock_irqsave(p, flags); in test_and_change_bit()
183 *p = old ^ mask; in test_and_change_bit()
184 _atomic_spin_unlock_irqrestore(p, flags); in test_and_change_bit()
186 return (old & mask) != 0; in test_and_change_bit()