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