• Home
  • Raw
  • Download

Lines Matching refs:r

64 bool refcount_add_not_zero_checked(unsigned int i, refcount_t *r)  in refcount_add_not_zero_checked()  argument
66 unsigned int new, val = atomic_read(&r->refs); in refcount_add_not_zero_checked()
79 } while (!atomic_try_cmpxchg_relaxed(&r->refs, &val, new)); in refcount_add_not_zero_checked()
103 void refcount_add_checked(unsigned int i, refcount_t *r) in refcount_add_checked() argument
105 WARN_ONCE(!refcount_add_not_zero_checked(i, r), "refcount_t: addition on 0; use-after-free.\n"); in refcount_add_checked()
121 bool refcount_inc_not_zero_checked(refcount_t *r) in refcount_inc_not_zero_checked() argument
123 unsigned int new, val = atomic_read(&r->refs); in refcount_inc_not_zero_checked()
134 } while (!atomic_try_cmpxchg_relaxed(&r->refs, &val, new)); in refcount_inc_not_zero_checked()
154 void refcount_inc_checked(refcount_t *r) in refcount_inc_checked() argument
156 WARN_ONCE(!refcount_inc_not_zero_checked(r), "refcount_t: increment on 0; use-after-free.\n"); in refcount_inc_checked()
180 bool refcount_sub_and_test_checked(unsigned int i, refcount_t *r) in refcount_sub_and_test_checked() argument
182 unsigned int new, val = atomic_read(&r->refs); in refcount_sub_and_test_checked()
194 } while (!atomic_try_cmpxchg_release(&r->refs, &val, new)); in refcount_sub_and_test_checked()
218 bool refcount_dec_and_test_checked(refcount_t *r) in refcount_dec_and_test_checked() argument
220 return refcount_sub_and_test_checked(1, r); in refcount_dec_and_test_checked()
234 void refcount_dec_checked(refcount_t *r) in refcount_dec_checked() argument
236 WARN_ONCE(refcount_dec_and_test_checked(r), "refcount_t: decrement hit 0; leaking memory.\n"); in refcount_dec_checked()
256 bool refcount_dec_if_one(refcount_t *r) in refcount_dec_if_one() argument
260 return atomic_try_cmpxchg_release(&r->refs, &val, 0); in refcount_dec_if_one()
275 bool refcount_dec_not_one(refcount_t *r) in refcount_dec_not_one() argument
277 unsigned int new, val = atomic_read(&r->refs); in refcount_dec_not_one()
292 } while (!atomic_try_cmpxchg_release(&r->refs, &val, new)); in refcount_dec_not_one()
314 bool refcount_dec_and_mutex_lock(refcount_t *r, struct mutex *lock) in refcount_dec_and_mutex_lock() argument
316 if (refcount_dec_not_one(r)) in refcount_dec_and_mutex_lock()
320 if (!refcount_dec_and_test(r)) { in refcount_dec_and_mutex_lock()
345 bool refcount_dec_and_lock(refcount_t *r, spinlock_t *lock) in refcount_dec_and_lock() argument
347 if (refcount_dec_not_one(r)) in refcount_dec_and_lock()
351 if (!refcount_dec_and_test(r)) { in refcount_dec_and_lock()
373 bool refcount_dec_and_lock_irqsave(refcount_t *r, spinlock_t *lock, in refcount_dec_and_lock_irqsave() argument
376 if (refcount_dec_not_one(r)) in refcount_dec_and_lock_irqsave()
380 if (!refcount_dec_and_test(r)) { in refcount_dec_and_lock_irqsave()