Expand description
Synchronisation primitives.
This module contains the kernel APIs related to synchronisation that have been ported or wrapped for usage by Rust code in the kernel.
Re-exports§
pub use completion::Completion;pub use lock::mutex::new_mutex;pub use lock::mutex::Mutex;pub use lock::mutex::MutexGuard;pub use lock::spinlock::new_spinlock;pub use lock::spinlock::SpinLock;pub use lock::spinlock::SpinLockGuard;
Modules§
- completion
- Completion support.
- lock
- Generic kernel lock and guard.
- poll
- Utilities for working with
struct poll_table. - rcu
- RCU support.
Macros§
- global_
lock - Defines a global lock.
- new_
condvar - Creates a
CondVarinitialiser with the given name and a newly-created lock class.
Structs§
- Arc
- A reference-counted pointer to an instance of
T. - ArcBorrow
- A borrowed reference to an
Arcinstance. - CondVar
- A conditional variable.
- Global
Guard - A guard for a
GlobalLock. - Global
Lock - Type used for global locks.
- Global
Locked By - A version of
LockedByfor aGlobalLock. - Lock
Class Key - Represents a lockdep class. It’s a wrapper around C’s
lock_class_key. - Locked
By - Allows access to some data to be serialised by a lock that does not wrap it.
- Unique
Arc - A refcounted object that is known to have a refcount of 1.
Enums§
- Cond
VarTimeout Result - The return type of
wait_timeout.
Traits§
- Global
Lock Backend - Trait implemented for marker types for global locks.