linux/rust/kernel/sync
Daniel Almeida 2497a7116f 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
2025-10-21 12:31:55 +02:00
..
arc rust: provide proper code documentation titles 2024-10-07 21:39:57 +02:00
atomic rust: sync: atomic: Add Atomic<{usize,isize}> 2025-09-15 09:38:34 +02:00
lock rust: lock: guard: Add T: Unpin bound to DerefMut 2025-10-21 12:31:55 +02:00
arc.rs Rust changes for v6.18 2025-09-30 19:12:49 -07:00
aref.rs rust: sync: extend module documentation of aref 2025-09-15 00:02:22 +02:00
atomic.rs rust: sync: atomic: Add the framework of arithmetic operations 2025-09-15 09:38:34 +02:00
barrier.rs rust: sync: Add memory barriers 2025-09-15 09:38:34 +02:00
completion.rs rust: completion: implement initial abstraction 2025-06-13 23:46:56 +02:00
condvar.rs rust: sync: Mark CondVar::notify_*() inline 2025-06-24 10:23:48 -07:00
lock.rs rust: lock: Pin the inner data 2025-10-21 12:31:55 +02:00
locked_by.rs rust: sync: add missing newline in locked_by log example 2025-03-06 20:44:06 +01:00
poll.rs Scheduler updates for v6.17: 2025-07-29 17:42:52 -07:00
rcu.rs rust: sync: rcu: Mark Guard methods as inline 2025-05-16 09:00:54 -04:00
refcount.rs rust: block: convert `block::mq` to use `Refcount` 2025-09-15 09:38:36 +02:00