summaryrefslogtreecommitdiff
path: root/rust/kernel/workqueue.rs
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2025-03-07 23:49:37 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-03-13 13:01:44 +0100
commit3ca8b102ef6229eb859f84f0f6a43a84a5d60c1b (patch)
tree5eb741a8bf010c9afc85031147dd555ddc2ed578 /rust/kernel/workqueue.rs
parent10027707e1cafe3761b3268bef090a7d4f968013 (diff)
rust: alloc: implement kernel `Box`
commit c8cfa8d0c0b10be216861fe904ea68978b1dcc97 upstream. `Box` provides the simplest way to allocate memory for a generic type with one of the kernel's allocators, e.g. `Kmalloc`, `Vmalloc` or `KVmalloc`. In contrast to Rust's `Box` type, the kernel `Box` type considers the kernel's GFP flags for all appropriate functions, always reports allocation failures through `Result<_, AllocError>` and remains independent from unstable features. Reviewed-by: Benno Lossin <benno.lossin@proton.me> Reviewed-by: Gary Guo <gary@garyguo.net> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Link: https://lore.kernel.org/r/20241004154149.93856-12-dakr@kernel.org [ Added backticks, fixed typos. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust/kernel/workqueue.rs')
0 files changed, 0 insertions, 0 deletions