rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] rust: sync: Add Lock::from_raw for ZST data types
@ 2024-09-16 22:05 Lyude Paul
  2024-09-16 22:05 ` [PATCH 1/1] rust: sync: Add Lock::from_raw() " Lyude Paul
  0 siblings, 1 reply; 4+ messages in thread
From: Lyude Paul @ 2024-09-16 22:05 UTC (permalink / raw)
  To: rust-for-linux
  Cc: Danilo Krummrich, airlied, Ingo Molnar, Will Deacon, Waiman Long,
	Peter Zijlstra, Thomas Gleixner, linux-kernel, Miguel Ojeda,
	Alex Gaynor, Wedson Almeida Filho, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-09-16 23:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-16 22:05 [PATCH 0/1] rust: sync: Add Lock::from_raw for ZST data types Lyude Paul
2024-09-16 22:05 ` [PATCH 1/1] rust: sync: Add Lock::from_raw() " Lyude Paul
2024-09-16 22:30   ` Gary Guo
2024-09-16 23:05     ` Lyude Paul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).