Lines Matching refs:ptr

8 static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size)  in __xchg()  argument
14 prefetchw((const void *)ptr); in __xchg()
24 : "r" (x), "r" (ptr) in __xchg()
34 : "r" (x), "r" (ptr) in __xchg()
38 __bad_xchg(ptr, size), ret = 0; in __xchg()
46 #define xchg(ptr,x) \ argument
47 ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
55 extern unsigned long __bad_cmpxchg(volatile void *ptr, int size);
58 static inline bool __cmpxchg_case_##name(volatile void *ptr, \
74 : "r" (ptr), "Ir" (*old), "r" (new) \
90 static always_inline bool __int_cmpxchg(volatile void *ptr, unsigned long *old, in __int_cmpxchg() argument
94 prefetchw((const void *)ptr); in __int_cmpxchg()
98 return __cmpxchg_case_1(ptr, old, new, timeout, max_try); in __int_cmpxchg()
100 return __cmpxchg_case_2(ptr, old, new, timeout, max_try); in __int_cmpxchg()
102 return __cmpxchg_case_4(ptr, old, new, timeout, max_try); in __int_cmpxchg()
104 return __bad_cmpxchg(ptr, size); in __int_cmpxchg()
110 static always_inline unsigned long __cmpxchg(volatile void *ptr, in __cmpxchg() argument
115 if (!__int_cmpxchg(ptr, &old, new, size, false, 0)) in __cmpxchg()
121 static always_inline unsigned long __cmpxchg_mb(volatile void *ptr, in __cmpxchg_mb() argument
128 ret = __cmpxchg(ptr, old, new, size); in __cmpxchg_mb()
144 static always_inline bool __cmpxchg_mb_timeout(volatile void *ptr, in __cmpxchg_mb_timeout() argument
153 ret = __int_cmpxchg(ptr, old, new, size, true, max_try); in __cmpxchg_mb_timeout()
159 #define cmpxchg(ptr,o,n) \ argument
160 ((__typeof__(*(ptr)))__cmpxchg_mb((ptr), \
163 sizeof(*(ptr))))
165 #define cmpxchg_local(ptr,o,n) \ argument
166 ((__typeof__(*(ptr)))__cmpxchg((ptr), \
169 sizeof(*(ptr))))