Lines Matching refs:refcount
25 /// 1. Request is owned by block layer (refcount 0).
27 /// (refcount 1).
29 /// (refcount 2).
31 /// (refcount > 2).
40 /// The states are tracked through the private `refcount` field of
51 /// `self.wrapper_ref().refcount()`.
63 /// * The caller must own a refcount on `ptr` that is transferred to the
84 /// `self.wrapper_ref().refcount() == 2`.
91 /// Try to take exclusive ownership of `this` by dropping the refcount to 0.
102 if let Err(_old) = this.wrapper_ref().refcount().compare_exchange(
171 /// The Rust request refcount has the following states:
176 refcount: AtomicU64,
180 /// Return a reference to the refcount of the request that is embedding
182 pub(crate) fn refcount(&self) -> &AtomicU64 {
183 &self.refcount
186 /// Return a pointer to the refcount of the request that is embedding the
195 unsafe { &raw mut (*this).refcount }
240 let refcount = &self.wrapper_ref().refcount();
243 let updated = atomic_relaxed_op_unless(refcount, |x| x + 1, 0);
247 panic!("Request refcount zero on clone")
257 let refcount = unsafe { &*RequestDataWrapper::refcount_ptr(wrapper_ptr) };
260 let new_refcount = atomic_relaxed_op_return(refcount, |x| x - 1);
264 panic!("Request reached refcount zero in Rust abstractions");