summaryrefslogtreecommitdiffstats
path: root/rust/alloc/alloc.rs
diff options
context:
space:
mode:
authorBenno Lossin <benno.lossin@proton.me>2023-04-08 14:26:01 +0200
committerMiguel Ojeda <ojeda@kernel.org>2023-04-12 18:41:05 +0200
commitd0fdc3961270617826e4794fca1d092853847707 (patch)
tree297fd0bcde51e9b9d7fef7c1bc7e12e0bf0ea155 /rust/alloc/alloc.rs
parentrust: init/sync: add `InPlaceInit` trait to pin-initialize smart pointers (diff)
downloadlinux-d0fdc3961270617826e4794fca1d092853847707.tar.xz
linux-d0fdc3961270617826e4794fca1d092853847707.zip
rust: init: add `PinnedDrop` trait and macros
The `PinnedDrop` trait that facilitates destruction of pinned types. It has to be implemented via the `#[pinned_drop]` macro, since the `drop` function should not be called by normal code, only by other destructors. It also only works on structs that are annotated with `#[pin_data(PinnedDrop)]`. Co-developed-by: Gary Guo <gary@garyguo.net> Signed-off-by: Gary Guo <gary@garyguo.net> Signed-off-by: Benno Lossin <benno.lossin@proton.me> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Andreas Hindborg <a.hindborg@samsung.com> Link: https://lore.kernel.org/r/20230408122429.1103522-10-y86-dev@protonmail.com Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/alloc/alloc.rs')
0 files changed, 0 insertions, 0 deletions