Lines Matching defs:ptr
17 __cmpxchg(volatile void *ptr, unsigned long expected, unsigned long new)
34 : "r"(ptr), /* Not "m": llock only supports reg direct addr mode */
47 __cmpxchg(volatile void *ptr, unsigned long expected, unsigned long new)
51 volatile unsigned long *p = ptr;
66 #define cmpxchg(ptr, o, n) ({ \
67 (typeof(*(ptr)))__cmpxchg((ptr), \
84 static inline unsigned long __xchg(unsigned long val, volatile void *ptr,
96 : "r"(ptr)
106 #define _xchg(ptr, with) ((typeof(*(ptr)))__xchg((unsigned long)(with), (ptr), \
107 sizeof(*(ptr))))
126 #define xchg(ptr, with) \
129 typeof(*(ptr)) old_val; \
132 old_val = _xchg(ptr, with); \
139 #define xchg(ptr, with) _xchg(ptr, with)