root/tools/include/asm-generic/bitops/atomic.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. set_bit
  2. clear_bit

   1 /* SPDX-License-Identifier: GPL-2.0 */
   2 #ifndef _TOOLS_LINUX_ASM_GENERIC_BITOPS_ATOMIC_H_
   3 #define _TOOLS_LINUX_ASM_GENERIC_BITOPS_ATOMIC_H_
   4 
   5 #include <asm/types.h>
   6 #include <asm/bitsperlong.h>
   7 
   8 static inline void set_bit(int nr, unsigned long *addr)
   9 {
  10         addr[nr / __BITS_PER_LONG] |= 1UL << (nr % __BITS_PER_LONG);
  11 }
  12 
  13 static inline void clear_bit(int nr, unsigned long *addr)
  14 {
  15         addr[nr / __BITS_PER_LONG] &= ~(1UL << (nr % __BITS_PER_LONG));
  16 }
  17 
  18 #endif /* _TOOLS_LINUX_ASM_GENERIC_BITOPS_ATOMIC_H_ */

/* [<][>][^][v][top][bottom][index][help] */