mirror of
https://github.com/torvalds/linux.git
synced 2026-12-03 11:53:53 +00:00
The rust rbtree exposes a map-like interface over keys and values, backed by the kernel red-black tree implementation. Values can be inserted, deleted, and retrieved from a `RBTree` by key. This base abstraction is used by binder to store key/value pairs and perform lookups, for example the patch "[PATCH RFC 03/20] rust_binder: add threading support" in the binder RFC [1]. Link: https://lore.kernel.org/rust-for-linux/[email protected]/ [1] Signed-off-by: Wedson Almeida Filho <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Tested-by: Alice Ryhl <[email protected]> Reviewed-by: Boqun Feng <[email protected]> Reviewed-by: Benno Lossin <[email protected]> Signed-off-by: Matt Gilbride <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ Updated link to docs.kernel.org. - Miguel ] Signed-off-by: Miguel Ojeda <[email protected]>
10 lines
217 B
C
10 lines
217 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#include <linux/rbtree.h>
|
|
|
|
void rust_helper_rb_link_node(struct rb_node *node, struct rb_node *parent,
|
|
struct rb_node **rb_link)
|
|
{
|
|
rb_link_node(node, parent, rb_link);
|
|
}
|