diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2021-05-07 16:19:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-07 16:19:20 +0200 |
| commit | 8f0b1863d0617be844112778e77544a5bcee79cd (patch) | |
| tree | d4ecc9536503dc6a45c709fca9bcc9825fad4aba /library/std/src/sys/wasm/mod.rs | |
| parent | 0c8c21d224ca94f63d2b07000e8223f3a041281b (diff) | |
| parent | cf79c06575f1710f05ee5309fb24bcdfff6f0140 (diff) | |
| download | rust-8f0b1863d0617be844112778e77544a5bcee79cd.tar.gz rust-8f0b1863d0617be844112778e77544a5bcee79cd.zip | |
Rollup merge of #84655 - CDirkx:wasm, r=m-ou-se
Cleanup of `wasm` Some more cleanup of `sys`, this time `wasm` - Reuse `unsupported::args` (functionally equivalent implementation, just an empty iterator). - Split out `atomics` implementation of `wasm::thread`, the non-`atomics` implementation is reused from `unsupported`. - Move all of the `atomics` code to a separate directory `wasm/atomics`. ````@rustbot```` label: +T-libs-impl r? ````@m-ou-se````
Diffstat (limited to 'library/std/src/sys/wasm/mod.rs')
| -rw-r--r-- | library/std/src/sys/wasm/mod.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/library/std/src/sys/wasm/mod.rs b/library/std/src/sys/wasm/mod.rs index afcc5ca9286..cd701a333f8 100644 --- a/library/std/src/sys/wasm/mod.rs +++ b/library/std/src/sys/wasm/mod.rs @@ -17,6 +17,7 @@ #![deny(unsafe_op_in_unsafe_fn)] pub mod alloc; +#[path = "../unsupported/args.rs"] pub mod args; #[path = "../unix/cmath.rs"] pub mod cmath; @@ -37,7 +38,6 @@ pub mod pipe; pub mod process; #[path = "../unsupported/stdio.rs"] pub mod stdio; -pub mod thread; #[path = "../unsupported/thread_local_dtor.rs"] pub mod thread_local_dtor; #[path = "../unsupported/thread_local_key.rs"] @@ -49,14 +49,16 @@ pub use crate::sys_common::os_str_bytes as os_str; cfg_if::cfg_if! { if #[cfg(target_feature = "atomics")] { - #[path = "condvar_atomics.rs"] + #[path = "atomics/condvar.rs"] pub mod condvar; - #[path = "mutex_atomics.rs"] + #[path = "atomics/mutex.rs"] pub mod mutex; - #[path = "rwlock_atomics.rs"] + #[path = "atomics/rwlock.rs"] pub mod rwlock; - #[path = "futex_atomics.rs"] + #[path = "atomics/futex.rs"] pub mod futex; + #[path = "atomics/thread.rs"] + pub mod thread; } else { #[path = "../unsupported/condvar.rs"] pub mod condvar; @@ -64,6 +66,8 @@ cfg_if::cfg_if! { pub mod mutex; #[path = "../unsupported/rwlock.rs"] pub mod rwlock; + #[path = "../unsupported/thread.rs"] + pub mod thread; } } |
