rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/1] rust: sync: Add Lock::from_raw for Lock<(), B>
@ 2024-09-16 23:17 Lyude Paul
  2024-09-16 23:17 ` [PATCH v2 1/1] rust: sync: Add Lock::from_raw() " Lyude Paul
  0 siblings, 1 reply; 3+ messages in thread
From: Lyude Paul @ 2024-09-16 23:17 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 ().

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


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

end of thread, other threads:[~2024-09-21 14:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-16 23:17 [PATCH v2 0/1] rust: sync: Add Lock::from_raw for Lock<(), B> Lyude Paul
2024-09-16 23:17 ` [PATCH v2 1/1] rust: sync: Add Lock::from_raw() " Lyude Paul
2024-09-21 14:52   ` kernel test robot

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).