--- /dev/null
+// Bit manipulation functions. These functions are not privileged.
+
+#ifndef _LL_ARCH_X86C_BITOPS_H
+#define _LL_ARCH_X86C_BITOPS_H
+
+// Set/Clear the nth bit in a multiword bitmap. These functions
+// are endian and word-size dependent.
+
+static inline void ll_multiword_set_bit(unsigned long *bitmap, int bit)
+{
+ asm("bts %1, %0" : "=m" (bitmap[0]) : "r" (bit) : "memory");
+}
+
+static inline void ll_multiword_clear_bit(unsigned long *bitmap, int bit)
+{
+ asm("btr %1, %0" : "=m" (bitmap[0]) : "r" (bit) : "memory");
+}
+
+#endif