Lines Matching full:old
201 #define atomic64_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new)) in ATOMIC_OPS() argument
204 #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new)) in ATOMIC_OPS() argument
214 * Returns the old value of @v. in ATOMIC_OPS()
218 int c, new, old; in ATOMIC_OPS() local
221 "1: ldl_l %[old],%[mem]\n" in ATOMIC_OPS()
222 " cmpeq %[old],%[u],%[c]\n" in ATOMIC_OPS()
223 " addl %[old],%[a],%[new]\n" in ATOMIC_OPS()
231 : [old] "=&r"(old), [new] "=&r"(new), [c] "=&r"(c) in ATOMIC_OPS()
235 return old; in ATOMIC_OPS()
246 * Returns the old value of @v.
250 s64 c, new, old; in atomic64_fetch_add_unless() local
253 "1: ldq_l %[old],%[mem]\n" in atomic64_fetch_add_unless()
254 " cmpeq %[old],%[u],%[c]\n" in atomic64_fetch_add_unless()
255 " addq %[old],%[a],%[new]\n" in atomic64_fetch_add_unless()
263 : [old] "=&r"(old), [new] "=&r"(new), [c] "=&r"(c) in atomic64_fetch_add_unless()
267 return old; in atomic64_fetch_add_unless()
272 * atomic64_dec_if_positive - decrement by 1 if old value positive
275 * The function returns the old value of *v minus 1, even if
280 s64 old, tmp; in atomic64_dec_if_positive() local
283 "1: ldq_l %[old],%[mem]\n" in atomic64_dec_if_positive()
284 " subq %[old],1,%[tmp]\n" in atomic64_dec_if_positive()
285 " ble %[old],2f\n" in atomic64_dec_if_positive()
292 : [old] "=&r"(old), [tmp] "=&r"(tmp) in atomic64_dec_if_positive()
296 return old - 1; in atomic64_dec_if_positive()