Lines Matching refs:ptr
26 static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size) in __xchg() argument
36 : "=&r" (ret), "=&r" (tmp), "+Q" (*(u8 *)ptr) in __xchg()
45 : "=&r" (ret), "=&r" (tmp), "+Q" (*(u16 *)ptr) in __xchg()
54 : "=&r" (ret), "=&r" (tmp), "+Q" (*(u32 *)ptr) in __xchg()
63 : "=&r" (ret), "=&r" (tmp), "+Q" (*(u64 *)ptr) in __xchg()
75 #define xchg(ptr,x) \ argument
77 __typeof__(*(ptr)) __ret; \
78 __ret = (__typeof__(*(ptr))) \
79 __xchg((unsigned long)(x), (ptr), sizeof(*(ptr))); \
83 static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, in __cmpxchg() argument
98 : "=&r" (res), "=&r" (oldval), "+Q" (*(u8 *)ptr) in __cmpxchg()
113 : "=&r" (res), "=&r" (oldval), "+Q" (*(u16 *)ptr) in __cmpxchg()
128 : "=&r" (res), "=&r" (oldval), "+Q" (*(u32 *)ptr) in __cmpxchg()
143 : "=&r" (res), "=&r" (oldval), "+Q" (*(u64 *)ptr) in __cmpxchg()
201 static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old, in __cmpxchg_mb() argument
207 ret = __cmpxchg(ptr, old, new, size); in __cmpxchg_mb()
213 #define cmpxchg(ptr, o, n) \ argument
215 __typeof__(*(ptr)) __ret; \
216 __ret = (__typeof__(*(ptr))) \
217 __cmpxchg_mb((ptr), (unsigned long)(o), (unsigned long)(n), \
218 sizeof(*(ptr))); \
222 #define cmpxchg_local(ptr, o, n) \ argument
224 __typeof__(*(ptr)) __ret; \
225 __ret = (__typeof__(*(ptr))) \
226 __cmpxchg((ptr), (unsigned long)(o), \
227 (unsigned long)(n), sizeof(*(ptr))); \
258 #define this_cpu_cmpxchg_1(ptr, o, n) _protect_cmpxchg_local(ptr, o, n) argument
259 #define this_cpu_cmpxchg_2(ptr, o, n) _protect_cmpxchg_local(ptr, o, n) argument
260 #define this_cpu_cmpxchg_4(ptr, o, n) _protect_cmpxchg_local(ptr, o, n) argument
261 #define this_cpu_cmpxchg_8(ptr, o, n) _protect_cmpxchg_local(ptr, o, n) argument
274 #define cmpxchg64(ptr,o,n) cmpxchg((ptr),(o),(n)) argument
275 #define cmpxchg64_local(ptr,o,n) cmpxchg_local((ptr),(o),(n)) argument
277 #define cmpxchg64_relaxed(ptr,o,n) cmpxchg_local((ptr),(o),(n)) argument