Commit 76784ba7 authored by Alice Ryhl's avatar Alice Ryhl
Browse files

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: default avatarAlice Ryhl <aliceryhl@google.com>
parent 43cb2baf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment