Lines Matching refs:ptr
13 #define xchg_local(ptr, x) \
15 __typeof__(*(ptr)) _x_ = (x); \
16 (__typeof__(*(ptr))) __arch_xchg_local((ptr), (unsigned long)_x_,\
17 sizeof(*(ptr))); \
20 #define arch_cmpxchg_local(ptr, o, n) \
22 __typeof__(*(ptr)) _o_ = (o); \
23 __typeof__(*(ptr)) _n_ = (n); \
24 (__typeof__(*(ptr))) __cmpxchg_local((ptr), (unsigned long)_o_, \
26 sizeof(*(ptr))); \
29 #define arch_cmpxchg64_local(ptr, o, n) \
31 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
32 cmpxchg_local((ptr), (o), (n)); \
45 #define arch_xchg(ptr, x) \
47 __typeof__(*(ptr)) __ret; \
48 __typeof__(*(ptr)) _x_ = (x); \
50 __ret = (__typeof__(*(ptr))) \
51 __arch_xchg((ptr), (unsigned long)_x_, sizeof(*(ptr))); \
56 #define arch_cmpxchg(ptr, o, n) \
58 __typeof__(*(ptr)) __ret; \
59 __typeof__(*(ptr)) _o_ = (o); \
60 __typeof__(*(ptr)) _n_ = (n); \
62 __ret = (__typeof__(*(ptr))) __cmpxchg((ptr), \
63 (unsigned long)_o_, (unsigned long)_n_, sizeof(*(ptr)));\
68 #define arch_cmpxchg64(ptr, o, n) \
70 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
71 arch_cmpxchg((ptr), (o), (n)); \