Lines Matching defs:ptr
55 #define arch_xchg(ptr,x) \
56 ({ __typeof__(*(ptr)) __ret; \
57 __ret = (__typeof__(*(ptr))) \
58 __arch_xchg((unsigned long)(x), (ptr), sizeof(*(ptr))); \
75 unsigned int *ptr = (unsigned int *) (maddr & ~2);
79 load32 = *ptr;
84 load32 = __cmpxchg_u32(ptr, old32, new32);
91 __arch_xchg(unsigned long x, __volatile__ void * ptr, int size)
95 return xchg16(ptr, x);
97 return xchg32(ptr, x);
99 return xchg64(ptr, x);
136 unsigned int *ptr = (unsigned int *) (maddr & ~3);
138 unsigned int load32 = *ptr;
143 load32 = __cmpxchg_u32(ptr, old32, new32);
157 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
161 return __cmpxchg_u8(ptr, old, new);
163 return __cmpxchg_u32(ptr, old, new);
165 return __cmpxchg_u64(ptr, old, new);
171 #define arch_cmpxchg(ptr,o,n) \
173 __typeof__(*(ptr)) _o_ = (o); \
174 __typeof__(*(ptr)) _n_ = (n); \
175 (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \
176 (unsigned long)_n_, sizeof(*(ptr))); \
184 static inline unsigned long __cmpxchg_local(volatile void *ptr,
190 case 8: return __cmpxchg(ptr, old, new, size);
192 return __generic_cmpxchg_local(ptr, old, new, size);
198 #define arch_cmpxchg_local(ptr, o, n) \
199 ((__typeof__(*(ptr)))__cmpxchg_local((ptr), (unsigned long)(o), \
200 (unsigned long)(n), sizeof(*(ptr))))
201 #define arch_cmpxchg64_local(ptr, o, n) \
203 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
204 arch_cmpxchg_local((ptr), (o), (n)); \
206 #define arch_cmpxchg64(ptr, o, n) arch_cmpxchg64_local((ptr), (o), (n))