Lines Matching refs:new
78 unsigned int old, new, val = atomic_read(&r->refs); in refcount_inc_not_zero() local
81 new = val + 1; in refcount_inc_not_zero()
86 if (unlikely(!new)) in refcount_inc_not_zero()
89 old = atomic_cmpxchg_relaxed(&r->refs, val, new); in refcount_inc_not_zero()
96 REFCOUNT_WARN(new == UINT_MAX, "refcount_t: saturated; leaking memory.\n"); in refcount_inc_not_zero()
123 unsigned int old, new, val = atomic_read(&r->refs); in refcount_sub_and_test() local
129 new = val - i; in refcount_sub_and_test()
130 if (new > val) { in refcount_sub_and_test()
131 REFCOUNT_WARN(new > val, "refcount_t: underflow; use-after-free.\n"); in refcount_sub_and_test()
135 old = atomic_cmpxchg_release(&r->refs, val, new); in refcount_sub_and_test()
142 return !new; in refcount_sub_and_test()