1 // Bit manipulation functions. These functions are not privileged.
3 #ifndef _LL_ARCH_X86C_BITOPS_H
4 #define _LL_ARCH_X86C_BITOPS_H
6 // Set/Clear the nth bit in a multiword bitmap. These functions
7 // are endian and word-size dependent.
9 static inline void ll_multiword_set_bit(unsigned long *bitmap, int bit)
11 asm("bts %1, %0" : "=m" (bitmap[0]) : "r" (bit) : "memory");
14 static inline void ll_multiword_clear_bit(unsigned long *bitmap, int bit)
16 asm("btr %1, %0" : "=m" (bitmap[0]) : "r" (bit) : "memory");