summaryrefslogtreecommitdiff
path: root/rust/kernel/sync.rs
diff options
context:
space:
mode:
authorWedson Almeida Filho <wedsonaf@gmail.com>2022-12-28 06:03:43 +0000
committerMiguel Ojeda <ojeda@kernel.org>2023-01-16 23:47:57 +0100
commit17f671602cc6a15e65869c387492c5753c6f3cd5 (patch)
tree1b6d9c637f4aa879d10b5265bf1869f0c67ff53f /rust/kernel/sync.rs
parentf75cb6fce4c91847d3b7cf2c5fc7c8eb4bc2d8f0 (diff)
rust: sync: introduce `ArcBorrow`
This allows us to create references to a ref-counted allocation without double-indirection and that still allow us to increment the refcount to a new `Arc<T>`. Signed-off-by: Wedson Almeida Filho <wedsonaf@gmail.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Acked-by: Boqun Feng <boqun.feng@gmail.com> Reviewed-by: Gary Guo <gary@garyguo.net> Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/kernel/sync.rs')
-rw-r--r--rust/kernel/sync.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/kernel/sync.rs b/rust/kernel/sync.rs
index 39b379dd548f..5de03ea83ea1 100644
--- a/rust/kernel/sync.rs
+++ b/rust/kernel/sync.rs
@@ -7,4 +7,4 @@
mod arc;
-pub use arc::Arc;
+pub use arc::{Arc, ArcBorrow};