Lines Matching +full:non +full:- +full:volatile
2 * Copyright (c) 1994 - 1997, 1999, 2000 Ralf Baechle (ralf@gnu.org)
5 * SPDX-License-Identifier: GPL-2.0
18 #include <asm-generic/bitops/fls.h>
19 #include <asm-generic/bitops/__fls.h>
20 #include <asm-generic/bitops/fls64.h>
21 #include <asm-generic/bitops/__ffs.h>
56 * set_bit - Atomically set a bit in memory
63 * restricted to acting on a single-word quantity.
66 set_bit(int nr, volatile void *addr) in set_bit()
81 * __set_bit - Set a bit in memory
85 * Unlike set_bit(), this function is non-atomic and may be reordered.
89 static __inline__ void __set_bit(int nr, volatile void * addr) in __set_bit()
98 * clear_bit - Clears a bit in memory
108 clear_bit(int nr, volatile void *addr) in clear_bit()
123 * change_bit - Toggle a bit in memory
129 * restricted to acting on a single-word quantity.
132 change_bit(int nr, volatile void *addr) in change_bit()
147 * __change_bit - Toggle a bit in memory
151 * Unlike change_bit(), this function is non-atomic and may be reordered.
155 static __inline__ void __change_bit(int nr, volatile void * addr) in __change_bit()
163 * test_and_set_bit - Set a bit and return its old value
171 test_and_set_bit(int nr, volatile void *addr) in test_and_set_bit()
192 * __test_and_set_bit - Set a bit and return its old value
196 * This operation is non-atomic and can be reordered.
200 static __inline__ int __test_and_set_bit(int nr, volatile void * addr) in __test_and_set_bit()
203 volatile int *a = addr; in __test_and_set_bit()
214 * test_and_clear_bit - Clear a bit and return its old value
222 test_and_clear_bit(int nr, volatile void *addr) in test_and_clear_bit()
244 * __test_and_clear_bit - Clear a bit and return its old value
248 * This operation is non-atomic and can be reordered.
252 static __inline__ int __test_and_clear_bit(int nr, volatile void * addr) in __test_and_clear_bit()
255 volatile int *a = addr; in __test_and_clear_bit()
266 * test_and_change_bit - Change a bit and return its new value
274 test_and_change_bit(int nr, volatile void *addr) in test_and_change_bit()
295 * __test_and_change_bit - Change a bit and return its old value
299 * This operation is non-atomic and can be reordered.
303 static __inline__ int __test_and_change_bit(int nr, volatile void * addr) in __test_and_change_bit()
306 volatile int *a = addr; in __test_and_change_bit()
319 * set_bit - Atomically set a bit in memory
326 * restricted to acting on a single-word quantity.
328 static __inline__ void set_bit(int nr, volatile void * addr) in set_bit()
331 volatile int *a = addr; in set_bit()
342 * __set_bit - Set a bit in memory
346 * Unlike set_bit(), this function is non-atomic and may be reordered.
350 static __inline__ void __set_bit(int nr, volatile void * addr) in __set_bit()
353 volatile int *a = addr; in __set_bit()
361 * clear_bit - Clears a bit in memory
370 static __inline__ void clear_bit(int nr, volatile void * addr) in clear_bit()
373 volatile int *a = addr; in clear_bit()
384 * change_bit - Toggle a bit in memory
390 * restricted to acting on a single-word quantity.
392 static __inline__ void change_bit(int nr, volatile void * addr) in change_bit()
395 volatile int *a = addr; in change_bit()
406 * __change_bit - Toggle a bit in memory
410 * Unlike change_bit(), this function is non-atomic and may be reordered.
414 static __inline__ void __change_bit(int nr, volatile void * addr) in __change_bit()
422 * test_and_set_bit - Set a bit and return its old value
429 static __inline__ int test_and_set_bit(int nr, volatile void * addr) in test_and_set_bit()
432 volatile int *a = addr; in test_and_set_bit()
446 * __test_and_set_bit - Set a bit and return its old value
450 * This operation is non-atomic and can be reordered.
454 static __inline__ int __test_and_set_bit(int nr, volatile void * addr) in __test_and_set_bit()
457 volatile int *a = addr; in __test_and_set_bit()
468 * test_and_clear_bit - Clear a bit and return its old value
475 static __inline__ int test_and_clear_bit(int nr, volatile void * addr) in test_and_clear_bit()
478 volatile int *a = addr; in test_and_clear_bit()
492 * __test_and_clear_bit - Clear a bit and return its old value
496 * This operation is non-atomic and can be reordered.
500 static __inline__ int __test_and_clear_bit(int nr, volatile void * addr) in __test_and_clear_bit()
503 volatile int *a = addr; in __test_and_clear_bit()
514 * test_and_change_bit - Change a bit and return its new value
521 static __inline__ int test_and_change_bit(int nr, volatile void * addr) in test_and_change_bit()
524 volatile int *a = addr; in test_and_change_bit()
538 * __test_and_change_bit - Change a bit and return its old value
542 * This operation is non-atomic and can be reordered.
546 static __inline__ int __test_and_change_bit(int nr, volatile void * addr) in __test_and_change_bit()
549 volatile int *a = addr; in __test_and_change_bit()
567 * test_bit - Determine whether a bit is set
571 static __inline__ int test_bit(int nr, const volatile void *addr) in test_bit()
581 * find_first_zero_bit - find the first zero bit in a memory region
585 * Returns the bit-number of the first zero bit, not the number of the byte
634 * find_next_zero_bit - find the first zero bit in a memory region
665 if (set < (32 - bit)) in find_next_zero_bit()
667 set = 32 - bit; in find_next_zero_bit()
673 res = find_first_zero_bit(p, size - 32 * (p - (unsigned int *) addr)); in find_next_zero_bit()
680 * ffz - find first zero in word.
712 * hweightN - returns the hamming weight of a N-bit word
726 * find_next_zero_bit - find the first zero bit in a memory region
739 size -= result; in find_next_zero_bit()
743 tmp |= ~0UL >> (32-offset); in find_next_zero_bit()
748 size -= 32; in find_next_zero_bit()
755 size -= 32; in find_next_zero_bit()
771 #if 0 /* Fool kernel-doc since it doesn't do macros yet */
773 * find_first_zero_bit - find the first zero bit in a memory region
777 * Returns the bit-number of the first zero bit, not the number of the byte
840 size -= result; in ext2_find_next_zero_bit()
848 * tmp |= ~0UL >> (32-offset); in ext2_find_next_zero_bit()
854 tmp |= __swab32(~0UL >> (32-offset)); in ext2_find_next_zero_bit()
859 size -= 32; in ext2_find_next_zero_bit()
866 size -= 32; in ext2_find_next_zero_bit()