diff options
| author | Daniel Almeida <daniel.almeida@collabora.com> | 2025-09-19 11:12:40 +0200 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2025-10-21 12:31:55 +0200 |
| commit | 2497a7116ff9a051d0e78885a27a52213bc2841d (patch) | |
| tree | 09689c4e5d782bdb7fd79809d972d4b7c78cac15 /rust/kernel/debugfs/traits.rs | |
| parent | da123f0ee40f0e5a3791bbaf58a1db1744c59f72 (diff) | |
rust: lock: Pin the inner data
In preparation to support Lock<T> where T is pinned, the first thing
that needs to be done is to structurally pin the 'data' member. This
switches the 't' parameter in Lock<T>::new() to take in an impl
PinInit<T> instead of a plain T. This in turn uses the blanket
implementation "impl PinInit<T> for T".
Subsequent patches will touch on Guard<T>.
Suggested-by: Benno Lossin <lossin@kernel.org>
Suggested-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Benno Lossin <lossin@kernel.org>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://github.com/Rust-for-Linux/linux/issues/1181
Diffstat (limited to 'rust/kernel/debugfs/traits.rs')
0 files changed, 0 insertions, 0 deletions