mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
a335e95914
This mirrors the entry API [1] from the Rust standard library on `RBTree`. This API can be used to access the entry at a specific key and make modifications depending on whether the key is vacant or occupied. This API is useful because it can often be used to avoid traversing the tree multiple times. This is used by binder to look up and conditionally access or insert a value, depending on whether it is there or not [2]. Link: https://doc.rust-lang.org/stable/std/collections/btree_map/enum.Entry.html [1] Link: https://android-review.googlesource.com/c/kernel/common/+/2849906 [2] Signed-off-by: Alice Ryhl <aliceryhl@google.com> Tested-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Boqun Feng <boqun.feng@gmail.com> Reviewed-by: Benno Lossin <benno.lossin@proton.me> Signed-off-by: Matt Gilbride <mattgilbride@google.com> Link: https://lore.kernel.org/r/20240822-b4-rbtree-v12-5-014561758a57@google.com Signed-off-by: Miguel Ojeda <ojeda@kernel.org> |
||
---|---|---|
.. | ||
alloc | ||
block | ||
init | ||
list | ||
net | ||
sync | ||
alloc.rs | ||
block.rs | ||
build_assert.rs | ||
device.rs | ||
error.rs | ||
firmware.rs | ||
init.rs | ||
ioctl.rs | ||
kunit.rs | ||
lib.rs | ||
list.rs | ||
net.rs | ||
page.rs | ||
prelude.rs | ||
print.rs | ||
rbtree.rs | ||
static_assert.rs | ||
std_vendor.rs | ||
str.rs | ||
sync.rs | ||
task.rs | ||
time.rs | ||
types.rs | ||
uaccess.rs | ||
workqueue.rs |