mirror-linux/drivers/android/binder
Vitaly Wool f56b131723 rust: rbtree: add immutable cursor
Sometimes we may need to iterate over, or find an element in a read
only (or read mostly) red-black tree, and in that case we don't need a
mutable reference to the tree, which we'll however have to take to be
able to use the current (mutable) cursor implementation.

This patch adds a simple immutable cursor implementation to RBTree,
which enables us to use an immutable tree reference. The existing
(fully featured) cursor implementation is renamed to CursorMut,
while retaining its functionality.

The only existing user of the [mutable] cursor for RBTrees (binder) is
updated to match the changes.

Signed-off-by: Vitaly Wool <vitaly.wool@konsulko.se>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20251014123339.2492210-1-vitaly.wool@konsulko.se
[ Applied `rustfmt`. Added intra-doc link. Fixed unclosed example.
  Fixed docs description. Fixed typo and other formatting nits.
    - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2025-11-16 21:56:57 +01:00
..
node
range_alloc rust: rbtree: add immutable cursor 2025-11-16 21:56:57 +01:00
Makefile
allocation.rs
context.rs
deferred_close.rs
defs.rs
error.rs rust_binder: use `kernel::fmt` 2025-10-20 04:04:23 +02:00
freeze.rs rust: rbtree: add immutable cursor 2025-11-16 21:56:57 +01:00
node.rs
page_range.rs
page_range_helper.c
page_range_helper.h
process.rs rust: rbtree: add immutable cursor 2025-11-16 21:56:57 +01:00
rust_binder.h
rust_binder_events.c
rust_binder_events.h
rust_binder_internal.h
rust_binder_main.rs
rust_binderfs.c
stats.rs rust: replace `CStr` with `core::ffi::CStr` 2025-10-22 07:47:27 +02:00
thread.rs
trace.rs
transaction.rs