Messages in this thread | | | Date | Fri, 31 Mar 2023 09:07:37 +0200 | Subject | Re: [PATCH v3 13/13] rust: sync: add functions for initializing `UniqueArc<MaybeUninit<T>>` | From | Alice Ryhl <> |
| |
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.
| |