| Date | Sat, 31 Dec 2022 19:55:08 +0000 | From | Gary Guo <> | Subject | Re: [PATCH 1/7] rust: sync: add `Arc` for ref-counted allocations |
| |
On Wed, 28 Dec 2022 06:03:40 +0000 Wedson Almeida Filho <wedsonaf@gmail.com> wrote:
> 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: Gary Guo <gary@garyguo.net>
> --- > rust/bindings/bindings_helper.h | 1 + > rust/bindings/lib.rs | 1 + > rust/helpers.c | 19 ++++ > rust/kernel/lib.rs | 1 + > rust/kernel/sync.rs | 10 ++ > rust/kernel/sync/arc.rs | 157 ++++++++++++++++++++++++++++++++ > 6 files changed, 189 insertions(+) > create mode 100644 rust/kernel/sync.rs > create mode 100644 rust/kernel/sync/arc.rs
|