[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240801133055.6d127fd1@eugeo>
Date: Thu, 1 Aug 2024 13:30:55 +0100
From: Gary Guo <gary@...yguo.net>
To: Benno Lossin <benno.lossin@...ton.me>
Cc: Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
Wedson Almeida Filho <wedsonaf@...il.com>, Boqun Feng
<boqun.feng@...il.com>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>, Andreas Hindborg <a.hindborg@...sung.com>,
Alice Ryhl <aliceryhl@...gle.com>, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] rust: init: add `write_[pin_]init` functions
On Mon, 08 Jul 2024 20:53:46 +0000
Benno Lossin <benno.lossin@...ton.me> wrote:
> Sometimes it is necessary to split allocation and initialization into
> two steps. One such situation is when reusing existing allocations
> obtained via `Box::drop_contents`. See [1] for an example.
> In order to support this use case add `write_[pin_]init` functions to the
> pin-init API. These functions operate on already allocated smart
> pointers that wrap `MaybeUninit<T>`.
>
> Signed-off-by: Benno Lossin <benno.lossin@...ton.me>
Reviewed-by: Gary Guo <gary@...yguo.net>
> Link: https://lore.kernel.org/rust-for-linux/f026532f-8594-4f18-9aa5-57ad3f5bc592@proton.me/ [1]
> ---
> rust/kernel/init.rs | 84 ++++++++++++++++++++++++++++++------------
> rust/kernel/prelude.rs | 2 +-
> 2 files changed, 61 insertions(+), 25 deletions(-)
Powered by blists - more mailing lists