Skip to content

Commit

Permalink
std: move ReentrantMutex to sync
Browse files Browse the repository at this point in the history
  • Loading branch information
joboet committed Nov 14, 2022
1 parent 96ddd32 commit c664944
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions library/std/src/io/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ use crate::fmt;
use crate::fs::File;
use crate::io::{self, BufReader, IoSlice, IoSliceMut, LineWriter, Lines};
use crate::sync::atomic::{AtomicBool, Ordering};
use crate::sync::{Arc, Mutex, MutexGuard, OnceLock};
use crate::sync::{Arc, Mutex, MutexGuard, OnceLock, ReentrantMutex, ReentrantMutexGuard};
use crate::sys::stdio;
use crate::sys_common::remutex::{ReentrantMutex, ReentrantMutexGuard};

type LocalStream = Arc<Mutex<Vec<u8>>>;

Expand Down
3 changes: 3 additions & 0 deletions library/std/src/sync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ pub use self::lazy_lock::LazyLock;
#[unstable(feature = "once_cell", issue = "74465")]
pub use self::once_lock::OnceLock;

pub(crate) use self::remutex::{ReentrantMutex, ReentrantMutexGuard};

pub mod mpsc;

mod barrier;
Expand All @@ -187,4 +189,5 @@ mod mutex;
mod once;
mod once_lock;
mod poison;
mod remutex;
mod rwlock;
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::{ReentrantMutex, ReentrantMutexGuard};
use crate::cell::RefCell;
use crate::sync::Arc;
use crate::sys_common::remutex::{ReentrantMutex, ReentrantMutexGuard};
use crate::thread;

#[test]
Expand Down
1 change: 0 additions & 1 deletion library/std/src/sys_common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ pub mod lazy_box;
pub mod memchr;
pub mod once;
pub mod process;
pub mod remutex;
pub mod thread;
pub mod thread_info;
pub mod thread_local_dtor;
Expand Down

0 comments on commit c664944

Please sign in to comment.