18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef _TOOLS_LINUX_ASM_GENERIC_BITOPS_ATOMIC_H_ 38c2ecf20Sopenharmony_ci#define _TOOLS_LINUX_ASM_GENERIC_BITOPS_ATOMIC_H_ 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <asm/types.h> 68c2ecf20Sopenharmony_ci#include <asm/bitsperlong.h> 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_cistatic inline void set_bit(int nr, unsigned long *addr) 98c2ecf20Sopenharmony_ci{ 108c2ecf20Sopenharmony_ci addr[nr / __BITS_PER_LONG] |= 1UL << (nr % __BITS_PER_LONG); 118c2ecf20Sopenharmony_ci} 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_cistatic inline void clear_bit(int nr, unsigned long *addr) 148c2ecf20Sopenharmony_ci{ 158c2ecf20Sopenharmony_ci addr[nr / __BITS_PER_LONG] &= ~(1UL << (nr % __BITS_PER_LONG)); 168c2ecf20Sopenharmony_ci} 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci#endif /* _TOOLS_LINUX_ASM_GENERIC_BITOPS_ATOMIC_H_ */ 19