lkml.org 
[lkml]   [2023]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3 13/13] rust: sync: add functions for initializing `UniqueArc<MaybeUninit<T>>`
From
On 3/30/23 00:33, y86-dev@protonmail.com wrote:
> From: Benno Lossin <y86-dev@protonmail.com>
>
> 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 <y86-dev@protonmail.com>

Reviewed-by: Alice Ryhl <aliceryhl@google.com>

I asked for this one because we will need it in the binder driver.

\
 
 \ /
  Last update: 2023-03-31 09:08    [W:0.275 / U:0.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site