linux/rust/kernel/sync
Wedson Almeida Filho 08d3f54928 rust: alloc: introduce the BoxExt trait
Make fallible versions of `new` and `new_uninit` methods available in
`Box` even though it doesn't implement them because we build `alloc`
with the `no_global_oom_handling` config.

They also have an extra `flags` parameter that allows callers to pass
flags to the allocator.

Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Link: https://lore.kernel.org/r/20240328013603.206764-7-wedsonaf@gmail.com
[ Used `Box::write()` to avoid one `unsafe` block as suggested by Boqun. ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2024-04-16 22:47:20 +02:00
..
arc rust: sync: arc: Implement Arc<dyn Any + Send + Sync>::downcast() 2023-04-10 23:55:43 +02:00
lock rust: kernel: add reexports for macros 2024-02-18 21:22:27 +01:00
arc.rs rust: alloc: introduce the BoxExt trait 2024-04-16 22:47:20 +02:00
condvar.rs rust: kernel: add reexports for macros 2024-02-18 21:22:27 +01:00
lock.rs rust: kernel: add doclinks 2024-02-18 21:22:27 +01:00
locked_by.rs rust: locked_by: shorten doclink preview 2024-02-18 21:22:27 +01:00