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;
22mod wait;
23
24pub use arc::{Arc, ArcBorrow, UniqueArc};
25pub use completion::Completion;
26pub use condvar::{new_condvar, CondVar, CondVarTimeoutResult};
27pub use lock::global::{global_lock, GlobalGuard, GlobalLock, GlobalLockBackend, GlobalLockedBy};
28pub use lock::mutex::{new_mutex, Mutex, MutexGuard};
29pub use lock::spinlock::{
30    new_spinlock,
31    new_spinlock_irq,
32    SpinLock,
33    SpinLockGuard,
34    SpinLockIrq,
35    SpinLockIrqGuard, //
36};
37pub use lockdep::{
38    static_lock_class,
39    LockClassKey, //
40};
41pub use locked_by::LockedBy;
42pub use refcount::Refcount;
43pub use set_once::SetOnce;
44pub use srcu::Srcu;
45pub use wait::{
46    new_waitqueue,
47    Interrupted,
48    TimedOut,
49    WaitError,
50    WaitQueue, //
51};