Lines Matching refs:new

63 	unsigned int new, val = atomic_read(&r->refs);  in refcount_add_not_zero_checked()  local
72 new = val + i; in refcount_add_not_zero_checked()
73 if (new < val) in refcount_add_not_zero_checked()
74 new = UINT_MAX; in refcount_add_not_zero_checked()
76 } while (!atomic_try_cmpxchg_relaxed(&r->refs, &val, new)); in refcount_add_not_zero_checked()
78 WARN_ONCE(new == UINT_MAX, "refcount_t: saturated; leaking memory.\n"); in refcount_add_not_zero_checked()
120 unsigned int new, val = atomic_read(&r->refs); in refcount_inc_not_zero_checked() local
123 new = val + 1; in refcount_inc_not_zero_checked()
128 if (unlikely(!new)) in refcount_inc_not_zero_checked()
131 } while (!atomic_try_cmpxchg_relaxed(&r->refs, &val, new)); in refcount_inc_not_zero_checked()
133 WARN_ONCE(new == UINT_MAX, "refcount_t: saturated; leaking memory.\n"); in refcount_inc_not_zero_checked()
179 unsigned int new, val = atomic_read(&r->refs); in refcount_sub_and_test_checked() local
185 new = val - i; in refcount_sub_and_test_checked()
186 if (new > val) { in refcount_sub_and_test_checked()
187 WARN_ONCE(new > val, "refcount_t: underflow; use-after-free.\n"); in refcount_sub_and_test_checked()
191 } while (!atomic_try_cmpxchg_release(&r->refs, &val, new)); in refcount_sub_and_test_checked()
193 return !new; in refcount_sub_and_test_checked()
269 unsigned int new, val = atomic_read(&r->refs); in refcount_dec_not_one() local
278 new = val - 1; in refcount_dec_not_one()
279 if (new > val) { in refcount_dec_not_one()
280 WARN_ONCE(new > val, "refcount_t: underflow; use-after-free.\n"); in refcount_dec_not_one()
284 } while (!atomic_try_cmpxchg_release(&r->refs, &val, new)); in refcount_dec_not_one()