diff options
author | Wedson Almeida Filho <[email protected]> | 2024-08-22 16:37:53 +0000 |
---|---|---|
committer | Miguel Ojeda <[email protected]> | 2024-08-31 17:35:08 +0200 |
commit | a0d13aac7022f95ec161c18d18e3d81172666ed8 (patch) | |
tree | 20edfa995ec14cf2b1d1a7d89a2f5ec6fbe503f2 /rust/kernel/lib.rs | |
parent | 6e6efc5fef4a1cdcccca3cffd5b73fd25d093352 (diff) |
rust: rbtree: add red-black tree implementation backed by the C version
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]>
Diffstat (limited to 'rust/kernel/lib.rs')
-rw-r--r-- | rust/kernel/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs index 9baea9e9ee1a..f10b06a78b9d 100644 --- a/rust/kernel/lib.rs +++ b/rust/kernel/lib.rs @@ -44,6 +44,7 @@ pub mod net; pub mod page; pub mod prelude; pub mod print; +pub mod rbtree; mod static_assert; #[doc(hidden)] pub mod std_vendor; |