diff options
author | Wedson Almeida Filho <wedsonaf@gmail.com> | 2022-12-28 07:03:43 +0100 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2023-01-16 23:47:57 +0100 |
commit | 17f671602cc6a15e65869c387492c5753c6f3cd5 (patch) | |
tree | 1b6d9c637f4aa879d10b5265bf1869f0c67ff53f /rust/kernel/sync.rs | |
parent | rust: sync: allow coercion from `Arc<T>` to `Arc<U>` (diff) | |
download | linux-17f671602cc6a15e65869c387492c5753c6f3cd5.tar.xz linux-17f671602cc6a15e65869c387492c5753c6f3cd5.zip |
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.rs | 2 |
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}; |