Lines Matching +full:arc +full:- +full:hs
1 // SPDX-License-Identifier: GPL-2.0
11 sync::{Arc, LockedBy, SpinLock},
35 /// make it possible to "move" a node from one list to another - when `do_work` is called directly
36 /// on the `Node`, then it's a no-op if there's also a pending wrapper.
38 /// Wrappers are generally only needed for zero-to-one refcount increments, and there are two cases
42 /// * One thread makes a zero-to-one strong increment, and another thread makes a zero-to-one weak
48 /// a zero-to-one strong increment. If the strong increment gets sent to the thread that was
80 fn should_normal_push(&self) -> bool { in should_normal_push()
89 fn should_push_weak_zero2one(&self) -> bool { in should_push_weak_zero2one()
93 fn can_push_weak_zero2one_normally(&self) -> bool { in can_push_weak_zero2one_normally()
104 fn should_push_strong_zero2one(&self) -> bool { in should_push_strong_zero2one()
108 fn can_push_strong_zero2one_normally(&self) -> bool { in can_push_strong_zero2one_normally()
136 fn new() -> Self { in new()
154 /// delivered to two different threads, which could appear as-if they were sent in opposite
170 freeze_list: KVVec<Arc<Process>>,
173 /// If this is non-zero, then we postpone any BR_RELEASE or BR_DECREFS notifications until the
187 pub(crate) owner: Arc<Process>,
211 owner: Arc<Process>, in new()
212 ) -> impl PinInit<Self> { in new()
238 links_track <- AtomicTracker::new(), in new()
242 pub(crate) fn has_oneway_transaction(&self, owner_inner: &mut ProcessInner) -> bool { in has_oneway_transaction()
252 ) -> Result<()> { in full_debug_print()
256 " node {}: u{:016x} c{:016x} hs {} hw {} cs {} cw {}", in full_debug_print()
301 ) -> Option<ListArc<NodeRefInfo, { NodeRefInfo::LIST_NODE }>> { in remove_node_info()
315 pub(crate) fn global_id(&self) -> usize { in global_id()
319 pub(crate) fn get_id(&self) -> (u64, u64) { in get_id()
335 ) -> Option<DLArc<Node>> { in inc_ref_done_locked()
342 inner.active_inc_refs -= 1; in inc_ref_done_locked()
344 // Having active inc_refs can inhibit dropping of ref-counts. Calculate whether we in inc_ref_done_locked()
354 // If we want to drop the ref-count again, tell the caller to schedule a work node for in inc_ref_done_locked()
376 ) -> Option<DLArc<Node>> { in update_refcount_locked()
390 // TODO: This method shouldn't be used for zero-to-one increments. in update_refcount_locked()
397 state.count -= count; in update_refcount_locked()
414 ) -> Result<Option<DLArc<Node>>, CouldNotDeliverCriticalIncrement> { in incr_refcount_allow_zero2one()
443 state.count -= 1; in incr_refcount_allow_zero2one()
457 ) -> Option<DLArc<dyn DeliverToRead>> { in incr_refcount_allow_zero2one_with_wrapper()
510 fn write(&self, writer: &mut BinderReturnWriter<'_>, code: u32) -> Result { in write()
521 ) -> Result<(), (BinderError, DLArc<dyn DeliverToRead>)> { in submit_oneway()
583 ) -> Option<DLArc<Transaction>> { in take_outdated_transaction()
601 ) -> Result<bool> { in do_work_locked()
651 process: &Arc<Process>, in add_freeze_listener()
653 ) -> Result { in add_freeze_listener()
654 let mut vec_alloc = KVVec::<Arc<Process>>::new(); in add_freeze_listener()
677 pub(crate) fn remove_freeze_listener(&self, p: &Arc<Process>) { in remove_freeze_listener()
682 inner.freeze_list.retain(|proc| !Arc::ptr_eq(proc, p)); in remove_freeze_listener()
694 pub(crate) fn freeze_list<'a>(&'a self, guard: &'a ProcessInner) -> &'a [Arc<Process>] { in freeze_list()
704 ) -> Result<bool> { in do_work()
728 fn should_sync_wakeup(&self) -> bool { in should_sync_wakeup()
733 fn debug_print(&self, m: &SeqFile, prefix: &str, _tprefix: &str) -> Result<()> { in debug_print()
746 /// Represents something that holds one or more ref-counts to a `Node`.
750 /// refcount, we destroy the NodeRef, which decrements the ref-count in process A.
766 pub(crate) fn new(node: DArc<Node>, strong_count: usize, weak_count: usize) -> Self { in new()
778 Arc::ptr_eq(&self.node, &other.node), in absorb()
795 inner.strong.count -= self.strong_node_count - 1; in absorb()
800 inner.weak.count -= self.weak_node_count - 1; in absorb()
807 pub(crate) fn get_count(&self) -> (usize, usize) { in get_count()
811 pub(crate) fn clone(&self, strong: bool) -> Result<NodeRef> { in clone()
828 pub(crate) fn update(&mut self, inc: bool, strong: bool) -> bool { in update()
859 *count -= 1; in update()
920 process: Arc<Process>,
949 process: Arc<Process>, in new()
951 ) -> impl PinInit<DTRWrap<Self>> { in new()
957 links_track <- AtomicTracker::new(), in new()
958 death_links <- ListLinks::new(), in new()
959 delivered_links <- ListLinks::new(), in new()
960 delivered_links_track <- AtomicTracker::new(), in new()
961 inner <- kernel::new_spinlock!(NodeDeathInner { in new()
976 pub(crate) fn set_cleared(self: &DArc<Self>, abort: bool) -> bool { in set_cleared()
1075 ) -> Result<bool> { in do_work()
1109 fn should_sync_wakeup(&self) -> bool { in should_sync_wakeup()
1114 fn debug_print(&self, m: &SeqFile, prefix: &str, _tprefix: &str) -> Result<()> { in debug_print()