summaryrefslogtreecommitdiffstats
path: root/rust/helpers/signal.c
diff options
context:
space:
mode:
authorAlex Mantel <alexmantel93@mailbox.org>2024-07-26 21:24:42 -0700
committerMiguel Ojeda <ojeda@kernel.org>2024-08-18 23:10:53 +0200
commit08f983a55ccf0b015e4788d1a0de0da84e4a7626 (patch)
treedab397173113f96de5ff58491617beb80f83def2 /rust/helpers/signal.c
parent47ac09b91befbb6a235ab620c32af719f8208399 (diff)
downloadlinux-08f983a55ccf0b015e4788d1a0de0da84e4a7626.tar.gz
linux-08f983a55ccf0b015e4788d1a0de0da84e4a7626.tar.bz2
linux-08f983a55ccf0b015e4788d1a0de0da84e4a7626.zip
rust: Implement the smart pointer `InPlaceInit` for `Arc`
For pinned and unpinned initialization of structs, a trait named `InPlaceInit` exists for uniform access. `Arc` did not implement `InPlaceInit` yet, although the functions already existed. The main reason for that, was that the trait itself returned a `Pin<Self>`. The `Arc` implementation of the kernel is already implicitly pinned. To enable `Arc` to implement `InPlaceInit` and to have uniform access, for in-place and pinned in-place initialization, an associated type is introduced for `InPlaceInit`. The new implementation of `InPlaceInit` for `Arc` sets `Arc` as the associated type. Older implementations use an explicit `Pin<T>` as the associated type. The implemented methods for `Arc` are mostly moved from a direct implementation on `Arc`. There should be no user impact. The implementation for `ListArc` is omitted, because it is not merged yet. Link: https://github.com/Rust-for-Linux/linux/issues/1079 Signed-off-by: Alex Mantel <alexmantel93@mailbox.org> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Benno Lossin <benno.lossin@proton.me> Link: https://lore.kernel.org/r/20240727042442.682109-1-alexmantel93@mailbox.org [ Removed "Rusts" (Benno). - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/helpers/signal.c')
0 files changed, 0 insertions, 0 deletions