diff options
| author | joboet <jonasboettiger@icloud.com> | 2022-10-08 20:19:21 +0200 |
|---|---|---|
| committer | joboet <jonasboettiger@icloud.com> | 2022-10-08 20:19:21 +0200 |
| commit | d4578013541a5c6ae34b62a83e8dcb11fb6d4b05 (patch) | |
| tree | df5b4b863f1ec8996dfcecd8ce357fe0af47c3aa /library/std/src/sys_common/mod.rs | |
| parent | cba4a389b3961a2fd72e01bd6cb0b0e065edaf3d (diff) | |
| download | rust-d4578013541a5c6ae34b62a83e8dcb11fb6d4b05.tar.gz rust-d4578013541a5c6ae34b62a83e8dcb11fb6d4b05.zip | |
std: optimize TLS on Windows
Diffstat (limited to 'library/std/src/sys_common/mod.rs')
| -rw-r--r-- | library/std/src/sys_common/mod.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/library/std/src/sys_common/mod.rs b/library/std/src/sys_common/mod.rs index 80f56bf7522..9ea3c52fa6d 100644 --- a/library/std/src/sys_common/mod.rs +++ b/library/std/src/sys_common/mod.rs @@ -33,11 +33,18 @@ pub mod rwlock; pub mod thread; pub mod thread_info; pub mod thread_local_dtor; -pub mod thread_local_key; pub mod thread_parker; pub mod wtf8; cfg_if::cfg_if! { + if #[cfg(target_os = "windows")] { + pub use crate::sys::thread_local_key; + } else { + pub mod thread_local_key; + } +} + +cfg_if::cfg_if! { if #[cfg(any(target_os = "l4re", target_os = "hermit", feature = "restricted-std", |
