diff options
author | Wedson Almeida Filho <walmeida@microsoft.com> | 2023-04-19 14:44:26 -0300 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2023-04-22 00:20:00 +0200 |
commit | c6d917a498bfef603f41bfc4d31e9699bb2909fc (patch) | |
tree | f710485f3aaadc20ffd4437fcd9aa2016462116f /rust/kernel/sync/lock.rs | |
parent | 6d20d629c6d8575be98eeebe49a16fb2d7b32350 (diff) | |
download | linux-c6d917a498bfef603f41bfc4d31e9699bb2909fc.tar.gz linux-c6d917a498bfef603f41bfc4d31e9699bb2909fc.tar.bz2 linux-c6d917a498bfef603f41bfc4d31e9699bb2909fc.zip |
rust: lock: introduce `SpinLock`
This is the `spinlock_t` lock backend and allows Rust code to use the
kernel spinlock idiomatically.
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Will Deacon <will@kernel.org>
Cc: Waiman Long <longman@redhat.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
Link: https://lore.kernel.org/r/20230419174426.132207-1-wedsonaf@gmail.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/kernel/sync/lock.rs')
-rw-r--r-- | rust/kernel/sync/lock.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rust/kernel/sync/lock.rs b/rust/kernel/sync/lock.rs index 2ea512a8dfab..3c166e08f3d4 100644 --- a/rust/kernel/sync/lock.rs +++ b/rust/kernel/sync/lock.rs @@ -11,6 +11,7 @@ use core::{cell::UnsafeCell, marker::PhantomData, marker::PhantomPinned}; use macros::pin_data; pub mod mutex; +pub mod spinlock; /// The "backend" of a lock. /// |