[PATCH v2 0/1] rust: sync: Add Lock::from_raw for Lock<(), B>

Lyude Paul posted 1 patch 2 months, 1 week ago
rust/kernel/sync/lock.rs | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
[PATCH v2 0/1] rust: sync: Add Lock::from_raw for Lock<(), B>
Posted by Lyude Paul 2 months, 1 week ago
This patch just adds a ::from_raw method to the kernel's Lock type,
which can be used for locks where the data type is ().

The current example usecase for this is rvkms, specifically
rust/kernel/drm/device.rs (kernel::drm::device::Device::event_lock())

https://gitlab.freedesktop.org/lyudess/linux/-/tree/rvkms-example-09162024

Lyude Paul (1):
  rust: sync: Add Lock::from_raw() for Lock<(), B>

 rust/kernel/sync/lock.rs | 28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)


base-commit: a2f11547052001bd448ccec81dd1e68409078fbb
-- 
2.46.0