Lines Matching defs:ptr
14 * @ptr: pointer to memory
22 static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
35 : "r" (ptr), "r" (x)
45 #define xchg(ptr, v) ((__typeof__(*(ptr)))__xchg((unsigned long)(v), (ptr), \
46 sizeof(*(ptr))))
49 * see rt-mutex-design.txt; cmpxchg supposedly checks if *ptr == A and swaps.
54 #define cmpxchg(ptr, old, new) \
56 __typeof__(ptr) __ptr = (ptr); \
57 __typeof__(*(ptr)) __old = (old); \
58 __typeof__(*(ptr)) __new = (new); \
59 __typeof__(*(ptr)) __oldval = 0; \