6#ifndef XTF_X86_BITOPS_H
7#define XTF_X86_BITOPS_H
11static inline bool test_bit(
unsigned int bit,
const void *addr)
15 asm volatile (
"bt %[bit], %[ptr];"
18 : [ptr]
"m" (*(
char *)addr),
29 asm volatile (
"lock; bts %[bit], %[ptr];"
32 [ptr]
"+m" (*(
char *)addr)
43 asm volatile (
"lock; btc %[bit], %[ptr];"
46 [ptr]
"+m" (*(
char *)addr)
57 asm volatile (
"lock; btr %[bit], %[ptr];"
60 [ptr]
"+m" (*(
char *)addr)
static bool test_bit(unsigned int bit, const void *addr)
static bool test_and_set_bit(unsigned int bit, volatile void *addr)
static bool test_and_clear_bit(unsigned int bit, volatile void *addr)
static bool test_and_change_bit(unsigned int bit, volatile void *addr)
#define ASM_FLAG_OUT(yes, no)