Lines Matching refs:new
62 * "new previous" value. That is why there is a loop. Preloading
94 #define __raw_cmpxchg(ptr, old, new, size, lock) \
98 __typeof__(*(ptr)) __new = (new); \
133 #define __cmpxchg(ptr, old, new, size) \
134 __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX)
136 #define __sync_cmpxchg(ptr, old, new, size) \
137 __raw_cmpxchg((ptr), (old), (new), (size), "lock; ")
139 #define __cmpxchg_local(ptr, old, new, size) \
140 __raw_cmpxchg((ptr), (old), (new), (size), "")
145 #define cmpxchg(ptr, old, new) \
146 __cmpxchg((ptr), (old), (new), sizeof(*ptr))
148 #define sync_cmpxchg(ptr, old, new) \
149 __sync_cmpxchg((ptr), (old), (new), sizeof(*ptr))
151 #define cmpxchg_local(ptr, old, new) \
152 __cmpxchg_local((ptr), (old), (new), sizeof(*ptr))
164 static inline u64 __cmpxchg64(volatile u64 *ptr, u64 old, u64 new)
170 : "b" ((u32)new),
171 "c" ((u32)(new >> 32)),
177 static inline u64 __cmpxchg64_local(volatile u64 *ptr, u64 old, u64 new)
183 : "b" ((u32)new),
184 "c" ((u32)(new >> 32)),
202 unsigned long new, int size)
206 return cmpxchg_386_u8(ptr, old, new);
208 return cmpxchg_386_u16(ptr, old, new);
210 return cmpxchg_386_u32(ptr, old, new);