mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
This is a basic implementation of `Arc` backed by C's `refcount_t`. It allows Rust code to idiomatically allocate memory that is ref-counted. Cc: Will Deacon <will@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Boqun Feng <boqun.feng@gmail.com> Cc: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Wedson Almeida Filho <wedsonaf@gmail.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Gary Guo <gary@garyguo.net> Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com> Acked-by: Boqun Feng <boqun.feng@gmail.com> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
10 lines
245 B
Rust
10 lines
245 B
Rust
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
//! Synchronisation primitives.
|
|
//!
|
|
//! This module contains the kernel APIs related to synchronisation that have been ported or
|
|
//! wrapped for usage by Rust code in the kernel.
|
|
|
|
mod arc;
|
|
|
|
pub use arc::Arc;
|