Lines Matching refs:ptr
204 #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
208 static inline unsigned long __xchg(unsigned long x, __volatile__ void * ptr,
213 return xchg32(ptr, x);
215 return xchg64(ptr, x);
258 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
262 return __cmpxchg_u32(ptr, old, new);
264 return __cmpxchg_u64(ptr, old, new);
270 #define cmpxchg(ptr,o,n) \
272 __typeof__(*(ptr)) _o_ = (o); \
273 __typeof__(*(ptr)) _n_ = (n); \
274 (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \
275 (unsigned long)_n_, sizeof(*(ptr))); \
283 static inline unsigned long __cmpxchg_local(volatile void *ptr,
289 case 8: return __cmpxchg(ptr, old, new, size);
291 return __cmpxchg_local_generic(ptr, old, new, size);
297 #define cmpxchg_local(ptr, o, n) \
298 ((__typeof__(*(ptr)))__cmpxchg_local((ptr), (unsigned long)(o), \
299 (unsigned long)(n), sizeof(*(ptr))))
300 #define cmpxchg64_local(ptr, o, n) \
302 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
303 cmpxchg_local((ptr), (o), (n)); \