linux/rust/kernel
Wedson Almeida Filho 9dc0436550 rust: sync: add Arc for ref-counted allocations
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>
2023-01-16 22:20:03 +01:00
..
sync rust: sync: add Arc for ref-counted allocations 2023-01-16 22:20:03 +01:00
allocator.rs rust: add kernel crate 2022-09-28 08:58:24 +02:00
build_assert.rs rust: build_assert: add build_{error,assert}! macros 2022-12-04 01:59:16 +01:00
error.rs rust: error: add From implementations for Error 2022-12-04 01:59:15 +01:00
lib.rs rust: sync: add Arc for ref-counted allocations 2023-01-16 22:20:03 +01:00
prelude.rs rust: build_assert: add build_{error,assert}! macros 2022-12-04 01:59:16 +01:00
print.rs rust: print: add pr_cont! macro 2022-12-01 20:12:44 +01:00
static_assert.rs rust: static_assert: add static_assert! macro 2022-12-04 01:59:16 +01:00
std_vendor.rs rust: std_vendor: add dbg! macro based on std's one 2022-12-04 01:59:16 +01:00
str.rs rust: str: add fmt! macro 2022-12-04 01:59:16 +01:00
sync.rs rust: sync: add Arc for ref-counted allocations 2023-01-16 22:20:03 +01:00
types.rs rust: types: add Opaque type 2022-12-04 01:59:16 +01:00