xref: /openbmc/linux/tools/include/asm-generic/bitops/atomic.h (revision 7ae9fb1b7ecbb5d85d07857943f677fd1a559b18)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2cae68d4fSArnaldo Carvalho de Melo #ifndef _TOOLS_LINUX_ASM_GENERIC_BITOPS_ATOMIC_H_
3cae68d4fSArnaldo Carvalho de Melo #define _TOOLS_LINUX_ASM_GENERIC_BITOPS_ATOMIC_H_
4cae68d4fSArnaldo Carvalho de Melo 
5cae68d4fSArnaldo Carvalho de Melo #include <asm/types.h>
6bb970707SArnaldo Carvalho de Melo #include <asm/bitsperlong.h>
7cae68d4fSArnaldo Carvalho de Melo 
8*bb056c0fSSean Christopherson /*
9*bb056c0fSSean Christopherson  * Just alias the test versions, all of the compiler built-in atomics "fetch",
10*bb056c0fSSean Christopherson  * and optimizing compile-time constants on x86 isn't worth the complexity.
11*bb056c0fSSean Christopherson  */
12*bb056c0fSSean Christopherson #define set_bit test_and_set_bit
13*bb056c0fSSean Christopherson #define clear_bit test_and_clear_bit
14cae68d4fSArnaldo Carvalho de Melo 
15cae68d4fSArnaldo Carvalho de Melo #endif /* _TOOLS_LINUX_ASM_GENERIC_BITOPS_ATOMIC_H_ */
16