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 8 mod arc; 9 pub mod aref; 10 pub mod atomic; 11 pub mod barrier; 12 pub mod completion; 13 mod condvar; 14 pub mod lock; 15 pub mod lockdep; 16 mod locked_by; 17 pub mod poll; 18 pub mod rcu; 19 mod refcount; 20 mod set_once; 21 pub mod srcu; 22 23 pub use arc::{Arc, ArcBorrow, UniqueArc}; 24 pub use completion::Completion; 25 pub use condvar::{new_condvar, CondVar, CondVarTimeoutResult}; 26 pub use lock::global::{global_lock, GlobalGuard, GlobalLock, GlobalLockBackend, GlobalLockedBy}; 27 pub use lock::mutex::{new_mutex, Mutex, MutexGuard}; 28 pub use lock::spinlock::{ 29 new_spinlock, 30 new_spinlock_irq, 31 SpinLock, 32 SpinLockGuard, 33 SpinLockIrq, 34 SpinLockIrqGuard, // 35 }; 36 pub use lockdep::{ 37 static_lock_class, 38 LockClassKey, // 39 }; 40 pub use locked_by::LockedBy; 41 pub use refcount::Refcount; 42 pub use set_once::SetOnce; 43 pub use srcu::Srcu; 44