• Home
  • Raw
  • Download

Lines Matching refs:new

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