rust: types: implement `ForeignOwnable` for `Arc<T>`
authorWedson Almeida Filho <wedsonaf@gmail.com>
Mon, 30 Jan 2023 06:44:04 +0000 (03:44 -0300)
committerMiguel Ojeda <ojeda@kernel.org>
Tue, 7 Feb 2023 10:24:24 +0000 (11:24 +0100)
commit0c7ae432576100ce3609bca0508b9fbcb686a5fe
tree364a93329a09347c14ec055d46bf2452a63505ea
parent7118594466b8ed7285adb1dc177f2c84bfa33265
rust: types: implement `ForeignOwnable` for `Arc<T>`

This allows us to hand ownership of Rust ref-counted 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/sync/arc.rs