Go to the documentation of this file. 1 #ifndef _ASM_SCORE_CMPXCHG_H
2 #define _ASM_SCORE_CMPXCHG_H
7 #define __xg(x) ((struct __xchg_dummy *)(x))
10 unsigned long __xchg(
volatile unsigned long *
m,
unsigned long val)
22 #define xchg(ptr, v) \
23 ((__typeof__(*(ptr))) __xchg((unsigned long *)(ptr), \
26 static inline unsigned long __cmpxchg(
volatile unsigned long *
m,
27 unsigned long old,
unsigned long new)
40 #define cmpxchg(ptr, o, n) \
41 ((__typeof__(*(ptr))) __cmpxchg((unsigned long *)(ptr), \
45 #define __HAVE_ARCH_CMPXCHG 1