[PATCH 0/1] rust: sync: Add Lock::from_raw for ZST data types

Lyude Paul posted 1 patch 2 months, 1 week ago
rust/kernel/sync/lock.rs | 32 ++++++++++++++++++++++++++++++--
1 file changed, 30 insertions(+), 2 deletions(-)
[PATCH 0/1] rust: sync: Add Lock::from_raw for ZST data types
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 a ZST.

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 ZST data types

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


base-commit: a2f11547052001bd448ccec81dd1e68409078fbb
-- 
2.46.0