Lines Matching full:spinlock
3 //! A kernel spinlock.
7 /// Creates a [`SpinLock`] initialiser with the given name and a newly-created lock class.
14 $crate::sync::SpinLock::new(
20 /// A spinlock.
22 /// Exposes the kernel's [`spinlock_t`]. When multiple CPUs attempt to lock the same spinlock, only
23 /// one at a time is allowed to progress, the others will block (spinning) until the spinlock is
26 /// Instances of [`SpinLock`] need a lock class and to be pinned. The recommended way to create such
32 /// contains an inner struct (`Inner`) that is protected by a spinlock.
35 /// use kernel::sync::{new_spinlock, SpinLock};
46 /// d: SpinLock<Inner>,
67 /// protected by a spinlock despite only having a shared reference:
70 /// use kernel::sync::SpinLock;
77 /// fn example(m: &SpinLock<Example>) {
84 /// [`spinlock_t`]: srctree/include/linux/spinlock.h
85 pub type SpinLock<T> = super::Lock<T, SpinLockBackend>; typedef
114 // caller is the owner of the spinlock. in unlock()