Lines Matching defs:ref
21 * @ref: Pointer to the reference count
24 static inline void rcuref_init(rcuref_t *ref, unsigned int cnt)
26 atomic_set(&ref->refcnt, cnt - 1);
31 * @ref: Pointer to the reference count
35 static inline unsigned int rcuref_read(rcuref_t *ref)
37 unsigned int c = atomic_read(&ref->refcnt);
43 extern __must_check bool rcuref_get_slowpath(rcuref_t *ref);
47 * @ref: Pointer to the reference count
61 static inline __must_check bool rcuref_get(rcuref_t *ref)
67 if (likely(!atomic_add_negative_relaxed(1, &ref->refcnt)))
71 return rcuref_get_slowpath(ref);
74 extern __must_check bool rcuref_put_slowpath(rcuref_t *ref);
79 static __always_inline __must_check bool __rcuref_put(rcuref_t *ref)
87 if (likely(!atomic_add_negative_release(-1, &ref->refcnt)))
94 return rcuref_put_slowpath(ref);
99 * @ref: Pointer to the reference count
119 static inline __must_check bool rcuref_put_rcusafe(rcuref_t *ref)
121 return __rcuref_put(ref);
126 * @ref: Pointer to the reference count
145 static inline __must_check bool rcuref_put(rcuref_t *ref)
150 released = __rcuref_put(ref);