]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: workqueue: add support for ARef<T>
authorDaniel Almeida <daniel.almeida@collabora.com>
Mon, 23 Mar 2026 23:26:59 +0000 (20:26 -0300)
committerAlice Ryhl <aliceryhl@google.com>
Thu, 26 Mar 2026 13:08:48 +0000 (13:08 +0000)
commitf5e841e4966c1873b9bb2c69d07947a54284e5eb
tree9c294b60638f9b652cf7a05f809defcbb190725d
parent1998e6be8239cd37817e05bdc21439de17b904df
rust: workqueue: add support for ARef<T>

Add support for the ARef<T> smart pointer. This allows an instance of
ARef<T> to handle deferred work directly, which can be convenient or even
necessary at times, depending on the specifics of the driver or subsystem.

The implementation is similar to that of Arc<T>, and a subsequent patch
will implement support for drm::Device as the first user. This is notably
important for work items that need access to the drm device, as it was not
possible to enqueue work on a ARef<drm::Device<T>> previously without
failing the orphan rule.

Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com>
Link: https://lore.kernel.org/r/20260323-aref-workitem-v3-1-f59729b812aa@collabora.com
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
rust/kernel/workqueue.rs