Skip to main content

kernel/
sync.rs

1// SPDX-License-Identifier: GPL-2.0
2
3//! Synchronisation primitives.
4//!
5//! This module contains the kernel APIs related to synchronisation that have been ported or
6//! wrapped for usage by Rust code in the kernel.
7
8mod arc;
9pub mod aref;
10pub mod atomic;
11pub mod barrier;
12pub mod completion;
13mod condvar;
14pub mod lock;
15pub mod lockdep;
16mod locked_by;
17pub mod poll;
18pub mod rcu;
19mod refcount;
20mod set_once;
21pub mod srcu;
22
23pub use arc::{Arc, ArcBorrow, UniqueArc};
24pub use completion::Completion;
25pub use condvar::{new_condvar, CondVar, CondVarTimeoutResult};
26pub use lock::global::{global_lock, GlobalGuard, GlobalLock, GlobalLockBackend, GlobalLockedBy};
27pub use lock::mutex::{new_mutex, Mutex, MutexGuard};
28pub use lock::spinlock::{
29    new_spinlock,
30    new_spinlock_irq,
31    SpinLock,
32    SpinLockGuard,
33    SpinLockIrq,
34    SpinLockIrqGuard, //
35};
36pub use lockdep::{
37    static_lock_class,
38    LockClassKey, //
39};
40pub use locked_by::LockedBy;
41pub use refcount::Refcount;
42pub use set_once::SetOnce;
43pub use srcu::Srcu;