about summary refs log tree commit diff
path: root/src/libstd/sys/windows
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2020-07-14 13:19:28 -0700
committerGitHub <noreply@github.com>2020-07-14 13:19:28 -0700
commitfadd91c630bb4cf606f7ef3ec68d7b6cbcb363b5 (patch)
tree8301e8592fa8efd518869065e902c007750ce455 /src/libstd/sys/windows
parent1e74f285998daf6809d2d418d2bbe1ab094e694e (diff)
parent7dc388654d6ef038065db23340e8eff7a567e5b4 (diff)
downloadrust-fadd91c630bb4cf606f7ef3ec68d7b6cbcb363b5.tar.gz
rust-fadd91c630bb4cf606f7ef3ec68d7b6cbcb363b5.zip
Rollup merge of #74263 - RalfJung:thread-local, r=Mark-Simulacrum
Slight reorganization of sys/(fast_)thread_local

I was long confused by the `thread_local` and `fast_thread_local` modules in the `sys(_common)` part of libstd. The names make it *sound* like `fast_thread_local` is just a faster version of `thread_local`, but really these are totally different APIs: one provides thread-local "keys", which are non-addressable pointer-sized pieces of local storage with an associated destructor; the other (the "fast" one) provides just a destructor.

So I propose we rename `fast_thread_local` to `thread_local_dtor`, and `thread_local` to `thread_local_key`. That's what this PR does.
Diffstat (limited to 'src/libstd/sys/windows')
-rw-r--r--src/libstd/sys/windows/mod.rs4
-rw-r--r--src/libstd/sys/windows/thread_local_dtor.rs (renamed from src/libstd/sys/windows/fast_thread_local.rs)2
-rw-r--r--src/libstd/sys/windows/thread_local_key.rs (renamed from src/libstd/sys/windows/thread_local.rs)0
3 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sys/windows/mod.rs b/src/libstd/sys/windows/mod.rs
index 193ab5b47ef..9a52371280e 100644
--- a/src/libstd/sys/windows/mod.rs
+++ b/src/libstd/sys/windows/mod.rs
@@ -20,7 +20,6 @@ pub mod cmath;
 pub mod condvar;
 pub mod env;
 pub mod ext;
-pub mod fast_thread_local;
 pub mod fs;
 pub mod handle;
 pub mod io;
@@ -35,7 +34,8 @@ pub mod process;
 pub mod rand;
 pub mod rwlock;
 pub mod thread;
-pub mod thread_local;
+pub mod thread_local_dtor;
+pub mod thread_local_key;
 pub mod time;
 cfg_if::cfg_if! {
     if #[cfg(not(target_vendor = "uwp"))] {
diff --git a/src/libstd/sys/windows/fast_thread_local.rs b/src/libstd/sys/windows/thread_local_dtor.rs
index 191fa07f32a..7be13bc4b2b 100644
--- a/src/libstd/sys/windows/fast_thread_local.rs
+++ b/src/libstd/sys/windows/thread_local_dtor.rs
@@ -1,4 +1,4 @@
 #![unstable(feature = "thread_local_internals", issue = "none")]
 #![cfg(target_thread_local)]
 
-pub use crate::sys_common::thread_local::register_dtor_fallback as register_dtor;
+pub use crate::sys_common::thread_local_dtor::register_dtor_fallback as register_dtor;
diff --git a/src/libstd/sys/windows/thread_local.rs b/src/libstd/sys/windows/thread_local_key.rs
index e0bb102b3af..e0bb102b3af 100644
--- a/src/libstd/sys/windows/thread_local.rs
+++ b/src/libstd/sys/windows/thread_local_key.rs