aboutsummaryrefslogtreecommitdiff
path: root/rust/kernel/init.rs
diff options
context:
space:
mode:
authorBenno Lossin <[email protected]>2023-04-08 12:26:33 +0000
committerMiguel Ojeda <[email protected]>2023-04-12 18:41:05 +0200
commit1944caa8e8dcb2d93d99d8364719ad8d07aa163f (patch)
treeca5de0a106f0e003f15d5e1db048b7d1b00a1af2 /rust/kernel/init.rs
parent701608bd030a888f654862295a49c5d0f42f864c (diff)
rust: sync: add functions for initializing `UniqueArc<MaybeUninit<T>>`
Add two functions `init_with` and `pin_init_with` to `UniqueArc<MaybeUninit<T>>` to initialize the memory of already allocated `UniqueArc`s. This is useful when you want to allocate memory check some condition inside of a context where allocation is forbidden and then conditionally initialize an object. Signed-off-by: Benno Lossin <[email protected]> Reviewed-by: Gary Guo <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Reviewed-by: Andreas Hindborg <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'rust/kernel/init.rs')
0 files changed, 0 insertions, 0 deletions