#include <linux/mmdebug.h>
#include <linux/types.h>
#include <linux/bug.h>
#include <asm-generic/cmpxchg-local.h>
Go to the source code of this file.
|
#define | xchg(ptr, x) |
|
#define | __HAVE_ARCH_CMPXCHG |
|
#define | cmpxchg(ptr, o, n) |
|
#define | cmpxchg64(ptr, o, n) |
|
#define | __cmpxchg_double_op(p1, p2, o1, o2, n1, n2, insn) |
|
#define | __cmpxchg_double_4(p1, p2, o1, o2, n1, n2) __cmpxchg_double_op(p1, p2, o1, o2, n1, n2, "cds") |
|
#define | __cmpxchg_double_8(p1, p2, o1, o2, n1, n2) __cmpxchg_double_op(p1, p2, o1, o2, n1, n2, "cdsg") |
|
#define | __cmpxchg_double(p1, p2, o1, o2, n1, n2) |
|
#define | cmpxchg_double(p1, p2, o1, o2, n1, n2) |
|
#define | system_has_cmpxchg_double() 1 |
|
#define | cmpxchg_local(ptr, o, n) |
|
#define | cmpxchg64_local(ptr, o, n) cmpxchg64((ptr), (o), (n)) |
|
#define __cmpxchg_double |
( |
|
p1, |
|
|
|
p2, |
|
|
|
o1, |
|
|
|
o2, |
|
|
|
n1, |
|
|
|
n2 |
|
) |
| |
Value:({ \
int __ret; \
switch (
sizeof(*(
p1))) { \
case 4: \
break; \
case 8: \
break; \
default: \
__cmpxchg_double_called_with_bad_pointer(); \
} \
__ret; \
})
Definition at line 234 of file cmpxchg.h.
#define __cmpxchg_double_4 |
( |
|
p1, |
|
|
|
p2, |
|
|
|
o1, |
|
|
|
o2, |
|
|
|
n1, |
|
|
|
n2 |
|
) |
| __cmpxchg_double_op(p1, p2, o1, o2, n1, n2, "cds") |
#define __cmpxchg_double_8 |
( |
|
p1, |
|
|
|
p2, |
|
|
|
o1, |
|
|
|
o2, |
|
|
|
n1, |
|
|
|
n2 |
|
) |
| __cmpxchg_double_op(p1, p2, o1, o2, n1, n2, "cdsg") |
#define __cmpxchg_double_op |
( |
|
p1, |
|
|
|
p2, |
|
|
|
o1, |
|
|
|
o2, |
|
|
|
n1, |
|
|
|
n2, |
|
|
|
insn |
|
) |
| |
Value:({ \
register __typeof__(*(
p1)) __old1
asm("2") = (o1); \
register __typeof__(*(p2)) __old2
asm("3") = (
o2); \
register __typeof__(*(
p1)) __new1
asm("4") = (n1); \
register __typeof__(*(p2)) __new2
asm("5") = (n2); \
" srl %[cc],28" \
: [cc] "=
d" (cc), [old] "+
d" (__old1), "+
d" (__old2) \
: [new] "
d" (__new1), "
d" (__new2), \
!cc; \
})
Definition at line 208 of file cmpxchg.h.
#define __HAVE_ARCH_CMPXCHG |
#define cmpxchg |
( |
|
ptr, |
|
|
|
o, |
|
|
|
n |
|
) |
| |
Value:({ \
__typeof__(*(
ptr)) __ret; \
__ret = (__typeof__(*(
ptr))) \
__ret; \
})
Definition at line 167 of file cmpxchg.h.
#define cmpxchg64 |
( |
|
ptr, |
|
|
|
o, |
|
|
|
n |
|
) |
| |
Value:({ \
__typeof__(*(
ptr)) __ret; \
__ret = (__typeof__(*(
ptr))) \
(unsigned long long)(o), \
(
unsigned long long)(
n)); \
__ret; \
})
Definition at line 197 of file cmpxchg.h.
#define cmpxchg_double |
( |
|
p1, |
|
|
|
p2, |
|
|
|
o1, |
|
|
|
o2, |
|
|
|
n1, |
|
|
|
n2 |
|
) |
| |
Value:({ \
__typeof__(
p1) __p1 = (
p1); \
__typeof__(p2) __p2 = (p2); \
int __ret; \
VM_BUG_ON((
unsigned long)((__p1) + 1) != (
unsigned long)(__p2));\
__ret; \
})
Definition at line 250 of file cmpxchg.h.
#define cmpxchg_local |
( |
|
ptr, |
|
|
|
o, |
|
|
|
n |
|
) |
| |
Value:({ \
__typeof__(*(
ptr)) __ret; \
__ret = (__typeof__(*(
ptr))) \
(
unsigned long)(
n),
sizeof(*(ptr))); \
__ret; \
})
Definition at line 292 of file cmpxchg.h.
#define system_has_cmpxchg_double |
( |
| ) |
1 |
Value:({ \
__typeof__(*(
ptr)) __ret; \
__ret = (__typeof__(*(
ptr))) \
__ret; \
})
Definition at line 77 of file cmpxchg.h.
void __cmpxchg_called_with_bad_pointer |
( |
void |
| ) |
|
void __cmpxchg_double_called_with_bad_pointer |
( |
void |
| ) |
|
void __xchg_called_with_bad_pointer |
( |
void |
| ) |
|