about summary refs log tree commit diff
path: root/src/libstd/sys/wasi
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/wasi
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/wasi')
-rw-r--r--src/libstd/sys/wasi/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/sys/wasi/mod.rs b/src/libstd/sys/wasi/mod.rs
index 4fe9661421b..85f5282034f 100644
--- a/src/libstd/sys/wasi/mod.rs
+++ b/src/libstd/sys/wasi/mod.rs
@@ -36,8 +36,6 @@ pub mod net;
 pub mod os;
 pub use crate::sys_common::os_str_bytes as os_str;
 pub mod ext;
-#[path = "../wasm/fast_thread_local.rs"]
-pub mod fast_thread_local;
 pub mod path;
 pub mod pipe;
 pub mod process;
@@ -47,8 +45,10 @@ pub mod rwlock;
 pub mod stack_overflow;
 pub mod stdio;
 pub mod thread;
-#[path = "../wasm/thread_local.rs"]
-pub mod thread_local;
+#[path = "../wasm/thread_local_dtor.rs"]
+pub mod thread_local_dtor;
+#[path = "../wasm/thread_local_key.rs"]
+pub mod thread_local_key;
 pub mod time;
 
 #[cfg(not(test))]