diff options
| author | bors <bors@rust-lang.org> | 2022-03-23 06:01:48 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-03-23 06:01:48 +0000 |
| commit | 36748cf814dcf6bbd6408e925a0b4770b7d47719 (patch) | |
| tree | 77c3dc03911ea12ff43022a5a59316e18436668b /library/std/src/sys/solid | |
| parent | 7b0bf9efc939341b48c6e9a335dee8a280085100 (diff) | |
| parent | 733153f2e550d46fe6f794c969df91368580e0b8 (diff) | |
| download | rust-36748cf814dcf6bbd6408e925a0b4770b7d47719.tar.gz rust-36748cf814dcf6bbd6408e925a0b4770b7d47719.zip | |
Auto merge of #95173 - m-ou-se:sys-locks-module, r=dtolnay
Move std::sys::{mutex, condvar, rwlock} to std::sys::locks.
This cleans up the the std::sys modules a bit by putting the locks in a single module called `locks` rather than spread over the three modules `mutex`, `condvar`, and `rwlock`. This makes it easier to organise lock implementations, which helps with https://github.com/rust-lang/rust/issues/93740.
Diffstat (limited to 'library/std/src/sys/solid')
| -rw-r--r-- | library/std/src/sys/solid/mod.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/library/std/src/sys/solid/mod.rs b/library/std/src/sys/solid/mod.rs index 049460755d6..492b1a55475 100644 --- a/library/std/src/sys/solid/mod.rs +++ b/library/std/src/sys/solid/mod.rs @@ -37,14 +37,21 @@ pub mod path; pub mod pipe; #[path = "../unsupported/process.rs"] pub mod process; -pub mod rwlock; pub mod stdio; -pub use self::itron::{condvar, mutex, thread}; +pub use self::itron::thread; pub mod memchr; pub mod thread_local_dtor; pub mod thread_local_key; pub mod time; +mod rwlock; + +pub mod locks { + pub use super::itron::condvar::*; + pub use super::itron::mutex::*; + pub use super::rwlock::*; +} + // SAFETY: must be called only once during runtime initialization. // NOTE: this is not guaranteed to run, for example when Rust code is called externally. pub unsafe fn init(_argc: isize, _argv: *const *const u8) {} |
