Lines Matching refs:old
201 #define atomic64_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new))
204 #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new))
214 * Returns the old value of @v.
218 int c, new, old;
221 "1: ldl_l %[old],%[mem]\n"
222 " cmpeq %[old],%[u],%[c]\n"
223 " addl %[old],%[a],%[new]\n"
231 : [old] "=&r"(old), [new] "=&r"(new), [c] "=&r"(c)
235 return old;
246 * Returns the old value of @v.
250 s64 c, new, old;
253 "1: ldq_l %[old],%[mem]\n"
254 " cmpeq %[old],%[u],%[c]\n"
255 " addq %[old],%[a],%[new]\n"
263 : [old] "=&r"(old), [new] "=&r"(new), [c] "=&r"(c)
267 return old;
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;
283 "1: ldq_l %[old],%[mem]\n"
284 " subq %[old],1,%[tmp]\n"
285 " ble %[old],2f\n"
292 : [old] "=&r"(old), [tmp] "=&r"(tmp)
296 return old - 1;