Lines Matching defs:val
78 unsigned int old, new, val = atomic_read(&r->refs);
81 new = val + 1;
83 if (!val)
89 old = atomic_cmpxchg_relaxed(&r->refs, val, new);
90 if (old == val)
93 val = old;
123 unsigned int old, new, val = atomic_read(&r->refs);
126 if (unlikely(val == UINT_MAX))
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);
136 if (old == val)
139 val = old;