Lines Matching full:new
82 * store NEW in MEM. Return the initial value in MEM. Success is
85 #define __raw_cmpxchg(ptr, old, new, size, lock) \ argument
89 __typeof__(*(ptr)) __new = (new); \
133 #define __cmpxchg(ptr, old, new, size) \ argument
134 __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX)
136 #define __sync_cmpxchg(ptr, old, new, size) \ argument
137 __raw_cmpxchg((ptr), (old), (new), (size), "lock; ")
139 #define __cmpxchg_local(ptr, old, new, size) \ argument
140 __raw_cmpxchg((ptr), (old), (new), (size), "")
148 #define arch_cmpxchg(ptr, old, new) \ argument
149 __cmpxchg(ptr, old, new, sizeof(*(ptr)))
151 #define arch_sync_cmpxchg(ptr, old, new) \ argument
152 __sync_cmpxchg(ptr, old, new, sizeof(*(ptr)))
154 #define arch_cmpxchg_local(ptr, old, new) \ argument
155 __cmpxchg_local(ptr, old, new, sizeof(*(ptr)))
168 asm volatile(lock "cmpxchgb %[new], %[ptr]" \
173 : [new] "q" (__new) \
180 asm volatile(lock "cmpxchgw %[new], %[ptr]" \
185 : [new] "r" (__new) \
192 asm volatile(lock "cmpxchgl %[new], %[ptr]" \
197 : [new] "r" (__new) \
204 asm volatile(lock "cmpxchgq %[new], %[ptr]" \
209 : [new] "r" (__new) \
221 #define __try_cmpxchg(ptr, pold, new, size) \ argument
222 __raw_try_cmpxchg((ptr), (pold), (new), (size), LOCK_PREFIX)
224 #define try_cmpxchg(ptr, pold, new) \ argument
225 __try_cmpxchg((ptr), (pold), (new), sizeof(*(ptr)))