Lines Matching defs:refcount
22 /// 1. Request is owned by block layer (refcount 0).
24 /// (refcount 1).
26 /// (refcount 2).
28 /// (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.
101 // To hand back the ownership, we need the current refcount to be 2.
103 // refcount to 0. `Refcount` does not provide a way to do this, so use the underlying
107 .refcount()
152 // SAFETY: We released a refcount above that we can reclaim here.
191 /// The Rust request refcount has the following states:
196 refcount: Refcount,
200 /// Return a reference to the refcount of the request that is embedding
202 pub(crate) fn refcount(&self) -> &Refcount {
203 &self.refcount
206 /// Return a pointer to the refcount of the request that is embedding the
215 unsafe { &raw mut (*this).refcount }
234 self.wrapper_ref().refcount().inc();
243 let refcount = unsafe { &*RequestDataWrapper::refcount_ptr(wrapper_ptr) };
246 let is_zero = refcount.dec_and_test();
250 panic!("Request reached refcount zero in Rust abstractions");