Lines Matching defs:rc
43 refcount_set(struct refcount *rc, int n)
45 atomic_set(&rc->rc_count, n);
49 refcount_inc(struct refcount *rc)
51 atomic_inc(&rc->rc_count);
55 refcount_inc_not_zero(struct refcount *rc)
60 old = atomic_read(&rc->rc_count);
64 } while (atomic_cmpxchg(&rc->rc_count, old, new) != old);
70 refcount_dec_and_test(struct refcount *rc)
75 old = atomic_read(&rc->rc_count);
78 } while (atomic_cmpxchg(&rc->rc_count, old, new) != old);
84 refcount_dec_and_lock_irqsave(struct refcount *rc, struct spinlock *lock,
88 return atomic_dec_and_lock_irqsave(&rc->rc_count, lock, *flagsp);
92 refcount_dec_and_mutex_lock(struct refcount *rc, struct mutex *lock)
97 old = atomic_read(&rc->rc_count);
101 if (atomic_dec_return(&rc->rc_count) == 0)
107 } while (atomic_cmpxchg(&rc->rc_count, old, new) != old);