Skip to content
Snippets Groups Projects
Commit a819edaf authored by Lyude Paul's avatar Lyude Paul
Browse files

DROP EVENTUALLY: rust: sync: Add SpinLockIrqGuard type alias


same for irq spinlocks. This will get dropped in the future since it's no
longer the solution that we're going to be going for upstream, but it is
taking forever for simple patches to be merged :(.

Signed-off-by: Lyude Paul's avatarLyude Paul <lyude@redhat.com>
parent a47a10f8
No related merge requests found
......@@ -17,7 +17,14 @@ 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, new_spinlock_irq, SpinLock, SpinLockGuard, SpinLockIrq};
pub use lock::spinlock::{
new_spinlock,
new_spinlock_irq,
SpinLock,
SpinLockGuard,
SpinLockIrq,
SpinLockIrqGuard,
};
pub use locked_by::LockedBy;
/// Represents a lockdep class. It's a wrapper around C's `lock_class_key`.
......
......@@ -216,6 +216,14 @@ pub use new_spinlock_irq;
/// ```
pub type SpinLockIrq<T> = super::Lock<T, SpinLockIrqBackend>;
/// A [`Guard`] acquired from locking a [`SpinLockIrq`].
///
/// This is simply a type alias for a [`Guard`] returned from locking a [`SpinLockIrq`]. It will
/// unlock the [`SpinLockIrq`] upon being dropped.
///
/// [`Guard`]: super::Guard
pub type SpinLockIrqGuard<'a, T: ?Sized> = super::Guard<'a, T, SpinLockIrqBackend>;
/// A kernel `spinlock_t` lock backend that is acquired in no-irq contexts.
pub struct SpinLockIrqBackend;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment