Go to the source code of this file.
#define __HAVE_ARCH_CMPXCHG 1 |
#define cmpxchg |
( |
|
ptr, |
|
|
|
old, |
|
|
|
new |
|
) |
| |
Value:({ \
__typeof__(*(ptr)) __old = (old); \
__typeof__(*(ptr)) __new = (new); \
__typeof__(*(ptr)) __oldval = 0; \
\
"1: %0 = memw_locked(%1);\
n" \
" {
P0 = cmp.eq(%0,%2);\n
" \
" memw_locked(%1,
p0) = %3;\n
" \
"2:\n" \
: "r" (__ptr), "r" (__old), "r" (__new) \
); \
__oldval; \
})
Definition at line 69 of file cmpxchg.h.