diff options
| author | Benno Lossin <[email protected]> | 2024-08-19 11:24:39 +0000 |
|---|---|---|
| committer | Miguel Ojeda <[email protected]> | 2024-08-21 22:16:16 +0000 |
| commit | 6d1c22d0ace31d096b0dab5318c6a0d3219d6456 (patch) | |
| tree | a26b0a491e2b3265b3a59960ba786c7043fc6320 /scripts/generate_rust_target.rs | |
| parent | rust: kernel: add `drop_contents` to `BoxExt` (diff) | |
| download | kernel-6d1c22d0ace31d096b0dab5318c6a0d3219d6456.tar.gz kernel-6d1c22d0ace31d096b0dab5318c6a0d3219d6456.zip | |
rust: init: add `write_[pin_]init` functions
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>`.
Link: https://lore.kernel.org/rust-for-linux/[email protected]/ [1]
Signed-off-by: Benno Lossin <[email protected]>
Reviewed-by: Boqun Feng <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Reviewed-by: Gary Guo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'scripts/generate_rust_target.rs')
0 files changed, 0 insertions, 0 deletions
