mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 13:03:48 +00:00
The lockdep types are currently stored directly in rust/kernel/sync.rs, but there are starting to be too many of them to keep them in that file. Thus, move them to a submodule. The new module is listed under LOCKING PRIMITIVES in the MAINTAINERS file. For commonly used lockdep logic it's useful to keep re-exports in kernel::sync, and this also avoids the need to update any users. Reviewed-by: Gary Guo <[email protected]> Reviewed-by: Boqun Feng <[email protected]> Reviewed-by: Carlos Llamas <[email protected]> Acked-by: Miguel Ojeda <[email protected]> Signed-off-by: Alice Ryhl <[email protected]> Link: https://patch.msgid.link/[email protected] [ Used the "kernel vertical" imports style. - Miguel ] Signed-off-by: Miguel Ojeda <[email protected]>
44 lines
1023 B
Rust
44 lines
1023 B
Rust
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
//! 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.
|
|
|
|
mod arc;
|
|
pub mod aref;
|
|
pub mod atomic;
|
|
pub mod barrier;
|
|
pub mod completion;
|
|
mod condvar;
|
|
pub mod lock;
|
|
pub mod lockdep;
|
|
mod locked_by;
|
|
pub mod poll;
|
|
pub mod rcu;
|
|
mod refcount;
|
|
mod set_once;
|
|
pub mod srcu;
|
|
|
|
pub use arc::{Arc, ArcBorrow, UniqueArc};
|
|
pub use completion::Completion;
|
|
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,
|
|
SpinLockIrqGuard, //
|
|
};
|
|
pub use lockdep::{
|
|
static_lock_class,
|
|
LockClassKey, //
|
|
};
|
|
pub use locked_by::LockedBy;
|
|
pub use refcount::Refcount;
|
|
pub use set_once::SetOnce;
|
|
pub use srcu::Srcu;
|