rust: types: implement `ForeignOwnable` for `Box<T>`
authorWedson Almeida Filho <wedsonaf@gmail.com>
Mon, 30 Jan 2023 06:44:02 +0000 (03:44 -0300)
committerMiguel Ojeda <ojeda@kernel.org>
Wed, 1 Feb 2023 12:24:19 +0000 (13:24 +0100)
commit26949bac1e8264c711a81f962845aa0538279c78
tree498c70f9d9bb65b9adc9787e573d5dabd8cc2d23
parent0fc4424d24a230c7fb539d5d708c81c68aafa9be
rust: types: implement `ForeignOwnable` for `Box<T>`

This allows us to hand ownership of Rust dynamically allocated
objects to the C side of the kernel.

Signed-off-by: Wedson Almeida Filho <wedsonaf@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Andreas Hindborg <a.hindborg@samsung.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/kernel/types.rs