Rename RWLock to RwLock in std::sys.

This commit is contained in:
Mara Bos
2022-04-06 16:33:53 +02:00
parent ce1a8131c6
commit 6e16f9b10f
16 changed files with 88 additions and 88 deletions

View File

@@ -3,4 +3,4 @@ mod mutex;
mod rwlock;
pub use condvar::{Condvar, MovableCondvar};
pub use mutex::{MovableMutex, Mutex, ReentrantMutex};
pub use rwlock::{MovableRWLock, RWLock};
pub use rwlock::{MovableRwLock, RwLock};

View File

@@ -1,18 +1,18 @@
use crate::cell::Cell;
pub struct RWLock {
pub struct RwLock {
// This platform has no threads, so we can use a Cell here.
mode: Cell<isize>,
}
pub type MovableRWLock = RWLock;
pub type MovableRwLock = RwLock;
unsafe impl Send for RWLock {}
unsafe impl Sync for RWLock {} // no threads on this platform
unsafe impl Send for RwLock {}
unsafe impl Sync for RwLock {} // no threads on this platform
impl RWLock {
pub const fn new() -> RWLock {
RWLock { mode: Cell::new(0) }
impl RwLock {
pub const fn new() -> RwLock {
RwLock { mode: Cell::new(0) }
}
#[inline]