diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2022-04-06 16:33:53 +0200 | 
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2022-04-06 16:33:53 +0200 | 
| commit | 6e16f9b10f676e87c5d31263759c3b9a65be0a35 (patch) | |
| tree | 8e29332b0efc8bcb2e5cf56a157d648889a4a220 /library/std/src/sys/wasm/atomics/rwlock.rs | |
| parent | ce1a8131c6cf6973ff5ce2be2b7500232efbdd5f (diff) | |
| download | rust-6e16f9b10f676e87c5d31263759c3b9a65be0a35.tar.gz rust-6e16f9b10f676e87c5d31263759c3b9a65be0a35.zip  | |
Rename RWLock to RwLock in std::sys.
Diffstat (limited to 'library/std/src/sys/wasm/atomics/rwlock.rs')
| -rw-r--r-- | library/std/src/sys/wasm/atomics/rwlock.rs | 14 | 
1 files changed, 7 insertions, 7 deletions
diff --git a/library/std/src/sys/wasm/atomics/rwlock.rs b/library/std/src/sys/wasm/atomics/rwlock.rs index 1cca809764c..690bb155e1a 100644 --- a/library/std/src/sys/wasm/atomics/rwlock.rs +++ b/library/std/src/sys/wasm/atomics/rwlock.rs @@ -1,13 +1,13 @@ use crate::cell::UnsafeCell; use crate::sys::locks::{Condvar, Mutex}; -pub struct RWLock { +pub struct RwLock { lock: Mutex, cond: Condvar, state: UnsafeCell<State>, } -pub type MovableRWLock = RWLock; +pub type MovableRwLock = RwLock; enum State { Unlocked, @@ -15,8 +15,8 @@ enum State { Writing, } -unsafe impl Send for RWLock {} -unsafe impl Sync for RWLock {} +unsafe impl Send for RwLock {} +unsafe impl Sync for RwLock {} // This rwlock implementation is a relatively simple implementation which has a // condition variable for readers/writers as well as a mutex protecting the @@ -26,9 +26,9 @@ unsafe impl Sync for RWLock {} // hopefully correct this implementation is very likely to want to be changed in // the future. -impl RWLock { - pub const fn new() -> RWLock { - RWLock { lock: Mutex::new(), cond: Condvar::new(), state: UnsafeCell::new(State::Unlocked) } +impl RwLock { + pub const fn new() -> RwLock { + RwLock { lock: Mutex::new(), cond: Condvar::new(), state: UnsafeCell::new(State::Unlocked) } } #[inline]  | 
