Lines Matching refs:new
66 unsigned int new, val = atomic_read(&r->refs); in refcount_add_not_zero_checked() local
75 new = val + i; in refcount_add_not_zero_checked()
76 if (new < val) in refcount_add_not_zero_checked()
77 new = UINT_MAX; in refcount_add_not_zero_checked()
79 } while (!atomic_try_cmpxchg_relaxed(&r->refs, &val, new)); in refcount_add_not_zero_checked()
81 WARN_ONCE(new == UINT_MAX, "refcount_t: saturated; leaking memory.\n"); in refcount_add_not_zero_checked()
123 unsigned int new, val = atomic_read(&r->refs); in refcount_inc_not_zero_checked() local
126 new = val + 1; in refcount_inc_not_zero_checked()
131 if (unlikely(!new)) in refcount_inc_not_zero_checked()
134 } while (!atomic_try_cmpxchg_relaxed(&r->refs, &val, new)); in refcount_inc_not_zero_checked()
136 WARN_ONCE(new == UINT_MAX, "refcount_t: saturated; leaking memory.\n"); in refcount_inc_not_zero_checked()
182 unsigned int new, val = atomic_read(&r->refs); in refcount_sub_and_test_checked() local
188 new = val - i; in refcount_sub_and_test_checked()
189 if (new > val) { in refcount_sub_and_test_checked()
190 WARN_ONCE(new > val, "refcount_t: underflow; use-after-free.\n"); in refcount_sub_and_test_checked()
194 } while (!atomic_try_cmpxchg_release(&r->refs, &val, new)); in refcount_sub_and_test_checked()
196 if (!new) { in refcount_sub_and_test_checked()
277 unsigned int new, val = atomic_read(&r->refs); in refcount_dec_not_one() local
286 new = val - 1; in refcount_dec_not_one()
287 if (new > val) { in refcount_dec_not_one()
288 WARN_ONCE(new > val, "refcount_t: underflow; use-after-free.\n"); in refcount_dec_not_one()
292 } while (!atomic_try_cmpxchg_release(&r->refs, &val, new)); in refcount_dec_not_one()