Commit a3e1a106 authored by Wedson Almeida Filho's avatar Wedson Almeida Filho Committed by Treehugger Robot
Browse files

FROMLIST: rust: rbtree: add `RBTreeIteratorMut`

Add mutable Iterator implementation (`RBTreeIteratorMut`) for `RBTree`,
allowing iteration over (key, value) pairs in key order. Only values are
mutable, as mutating keys implies modifying a node's position in the tree.

Mutable iteration is used by the binder driver during shutdown to
clean up the tree maintained by the "range allocator" [1].

Link: https://lore.kernel.org/rust-for-linux/20231101-rust-binder-v1-6-08ba9197f637@google.com/

 [1]
Signed-off-by: default avatarWedson Almeida Filho <wedsonaf@gmail.com>
Signed-off-by: default avatarMatt Gilbride <mattgilbride@gmail.com>

Bug: 324206405
Link: https://lore.kernel.org/all/20240205-b4-rbtree-v1-4-995e3eee38c0@google.com/


Change-Id: I1cd8938036c1c8e5a4237b89c7917adbac5ce371
Signed-off-by: default avatarAlice Ryhl <aliceryhl@google.com>
parent 97cbf6e2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment