summaryrefslogtreecommitdiff
path: root/rust/kernel/sync.rs
diff options
context:
space:
mode:
authorLyude Paul <lyude@redhat.com>2024-11-20 17:26:29 -0500
committerBoqun Feng <boqun.feng@gmail.com>2024-12-19 14:04:42 -0800
commiteb5ccb038284dc0e69822d71aafcbf7b57394aad (patch)
treeef0e1d0ae3f28f48eecf29772cf8e2f321f1dec3 /rust/kernel/sync.rs
parent37624dde4768ec25d2f9798aa75bf32e18c0eae2 (diff)
rust: sync: Add SpinLockGuard type alias
A simple helper alias for code that needs to deal with Guard types returned from SpinLocks. Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Link: https://lore.kernel.org/r/20241120222742.2490495-3-lyude@redhat.com
Diffstat (limited to 'rust/kernel/sync.rs')
-rw-r--r--rust/kernel/sync.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/kernel/sync.rs b/rust/kernel/sync.rs
index 2721b5c8deda..dffdaad972ce 100644
--- a/rust/kernel/sync.rs
+++ b/rust/kernel/sync.rs
@@ -17,7 +17,7 @@ pub use arc::{Arc, ArcBorrow, UniqueArc};
pub use condvar::{new_condvar, CondVar, CondVarTimeoutResult};
pub use lock::global::{global_lock, GlobalGuard, GlobalLock, GlobalLockBackend, GlobalLockedBy};
pub use lock::mutex::{new_mutex, Mutex, MutexGuard};
-pub use lock::spinlock::{new_spinlock, SpinLock};
+pub use lock::spinlock::{new_spinlock, SpinLock, SpinLockGuard};
pub use locked_by::LockedBy;
/// Represents a lockdep class. It's a wrapper around C's `lock_class_key`.