ANDROID: rust_binder: don't use boolean to schedule nodes
Currently, `inc_ref_done_locked` and `update_refcount_locked` return a
boolean indicating whether the node should be scheduled to a todo list.
(This is needed when we need to deliver a refcount increment or
decrement to userspace.)
However, even if one of these methods returns true, this might not cause
the node to get scheduled on a work list. This is because it might
already be on a work list, in which case the caller just does nothing.
It turns out that for zero-to-one refcount increments, doing nothing is
wrong in this case.
In preparation for fixing that, update the existing methods to return a
`ListArc` so that the caller can schedule the node unconditionally when
the node says it needs to be scheduled. The actual fix is in a follow-up
change.
Bug: 333535706
Change-Id: I29e08a8ce54a2e3757ede9e7d9a547b8e002b810
Signed-off-by:
Alice Ryhl <aliceryhl@google.com>
Loading
Please sign in to comment