Lines Matching refs:ptr
14 #define __xchg_relaxed(ptr, new, size) \
16 __typeof__(ptr) __ptr = (ptr); \
18 __typeof__(*(ptr)) __ret; \
40 #define arch_xchg_relaxed(ptr, x) \
42 __typeof__(*(ptr)) _x_ = (x); \
43 (__typeof__(*(ptr))) __xchg_relaxed((ptr), \
44 _x_, sizeof(*(ptr))); \
47 #define __xchg_acquire(ptr, new, size) \
49 __typeof__(ptr) __ptr = (ptr); \
51 __typeof__(*(ptr)) __ret; \
75 #define arch_xchg_acquire(ptr, x) \
77 __typeof__(*(ptr)) _x_ = (x); \
78 (__typeof__(*(ptr))) __xchg_acquire((ptr), \
79 _x_, sizeof(*(ptr))); \
82 #define __xchg_release(ptr, new, size) \
84 __typeof__(ptr) __ptr = (ptr); \
86 __typeof__(*(ptr)) __ret; \
110 #define arch_xchg_release(ptr, x) \
112 __typeof__(*(ptr)) _x_ = (x); \
113 (__typeof__(*(ptr))) __xchg_release((ptr), \
114 _x_, sizeof(*(ptr))); \
117 #define __arch_xchg(ptr, new, size) \
119 __typeof__(ptr) __ptr = (ptr); \
121 __typeof__(*(ptr)) __ret; \
143 #define arch_xchg(ptr, x) \
145 __typeof__(*(ptr)) _x_ = (x); \
146 (__typeof__(*(ptr))) __arch_xchg((ptr), _x_, sizeof(*(ptr))); \
149 #define xchg32(ptr, x) \
151 BUILD_BUG_ON(sizeof(*(ptr)) != 4); \
152 arch_xchg((ptr), (x)); \
155 #define xchg64(ptr, x) \
157 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
158 arch_xchg((ptr), (x)); \
166 #define __cmpxchg_relaxed(ptr, old, new, size) \
168 __typeof__(ptr) __ptr = (ptr); \
169 __typeof__(*(ptr)) __old = (old); \
170 __typeof__(*(ptr)) __new = (new); \
171 __typeof__(*(ptr)) __ret; \
202 #define arch_cmpxchg_relaxed(ptr, o, n) \
204 __typeof__(*(ptr)) _o_ = (o); \
205 __typeof__(*(ptr)) _n_ = (n); \
206 (__typeof__(*(ptr))) __cmpxchg_relaxed((ptr), \
207 _o_, _n_, sizeof(*(ptr))); \
210 #define __cmpxchg_acquire(ptr, old, new, size) \
212 __typeof__(ptr) __ptr = (ptr); \
213 __typeof__(*(ptr)) __old = (old); \
214 __typeof__(*(ptr)) __new = (new); \
215 __typeof__(*(ptr)) __ret; \
248 #define arch_cmpxchg_acquire(ptr, o, n) \
250 __typeof__(*(ptr)) _o_ = (o); \
251 __typeof__(*(ptr)) _n_ = (n); \
252 (__typeof__(*(ptr))) __cmpxchg_acquire((ptr), \
253 _o_, _n_, sizeof(*(ptr))); \
256 #define __cmpxchg_release(ptr, old, new, size) \
258 __typeof__(ptr) __ptr = (ptr); \
259 __typeof__(*(ptr)) __old = (old); \
260 __typeof__(*(ptr)) __new = (new); \
261 __typeof__(*(ptr)) __ret; \
294 #define arch_cmpxchg_release(ptr, o, n) \
296 __typeof__(*(ptr)) _o_ = (o); \
297 __typeof__(*(ptr)) _n_ = (n); \
298 (__typeof__(*(ptr))) __cmpxchg_release((ptr), \
299 _o_, _n_, sizeof(*(ptr))); \
302 #define __cmpxchg(ptr, old, new, size) \
304 __typeof__(ptr) __ptr = (ptr); \
305 __typeof__(*(ptr)) __old = (old); \
306 __typeof__(*(ptr)) __new = (new); \
307 __typeof__(*(ptr)) __ret; \
340 #define arch_cmpxchg(ptr, o, n) \
342 __typeof__(*(ptr)) _o_ = (o); \
343 __typeof__(*(ptr)) _n_ = (n); \
344 (__typeof__(*(ptr))) __cmpxchg((ptr), \
345 _o_, _n_, sizeof(*(ptr))); \
348 #define arch_cmpxchg_local(ptr, o, n) \
349 (__cmpxchg_relaxed((ptr), (o), (n), sizeof(*(ptr))))
351 #define arch_cmpxchg64(ptr, o, n) \
353 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
354 arch_cmpxchg((ptr), (o), (n)); \
357 #define arch_cmpxchg64_local(ptr, o, n) \
359 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
360 arch_cmpxchg_relaxed((ptr), (o), (n)); \