Lines Matching refs:ptr
13 static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size)
21 tmp = *(u8 *)ptr;
22 *(u8 *)ptr = x;
26 tmp = *(u16 *)ptr;
27 *(u16 *)ptr = x;
31 tmp = *(u32 *)ptr;
32 *(u32 *)ptr = x;
36 tmp = __invalid_xchg_size(x, ptr, size);
44 static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size)
53 : "=&d" (x) : "d" (x), "m" (*__xg(ptr)) : "memory");
61 : "=&d" (x) : "d" (x), "m" (*__xg(ptr)) : "memory");
69 : "=&d" (x) : "d" (x), "m" (*__xg(ptr)) : "memory");
72 x = __invalid_xchg_size(x, ptr, size);
79 #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
83 #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
121 #define cmpxchg(ptr, o, n) \
122 ((__typeof__(*(ptr)))__cmpxchg((ptr), (unsigned long)(o), \
123 (unsigned long)(n), sizeof(*(ptr))))
124 #define cmpxchg_local(ptr, o, n) \
125 ((__typeof__(*(ptr)))__cmpxchg((ptr), (unsigned long)(o), \
126 (unsigned long)(n), sizeof(*(ptr))))
128 #define cmpxchg64(ptr, o, n) cmpxchg64_local((ptr), (o), (n))