[PATCH v11 11/14] rust: sync: Expose lock::Backend

Lyude Paul posted 14 patches 2 months, 3 weeks ago
There is a newer version of this series
[PATCH v11 11/14] rust: sync: Expose lock::Backend
Posted by Lyude Paul 2 months, 3 weeks ago
Due to the addition of sync::lock::Backend::Context, lock guards can be
returned with a different Backend than their respective lock. Since we'll
be adding a trait bound for Backend to GlobalGuard in order to support
this, users will need to be able to directly refer to Backend so that they
can use it in trait bounds.

So, let's make this easier for users and expose Backend in sync.

Signed-off-by: Lyude Paul <lyude@redhat.com>
---
 rust/kernel/sync.rs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rust/kernel/sync.rs b/rust/kernel/sync.rs
index f1e448e096ea9..ebf004193bca5 100644
--- a/rust/kernel/sync.rs
+++ b/rust/kernel/sync.rs
@@ -25,6 +25,7 @@
 pub use lock::spinlock::{
     new_spinlock, new_spinlock_irq, SpinLock, SpinLockGuard, SpinLockIrq, SpinLockIrqGuard,
 };
+pub use lock::Backend;
 pub use locked_by::LockedBy;
 
 /// Represents a lockdep class. It's a wrapper around C's `lock_class_key`.
-- 
2.50.0