about summary refs log tree commit diff
path: root/src/libstd/sys/sgx
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/sgx
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/sgx')
-rw-r--r--src/libstd/sys/sgx/mod.rs2
-rw-r--r--src/libstd/sys/sgx/thread_local_key.rs (renamed from src/libstd/sys/sgx/thread_local.rs)0
2 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sys/sgx/mod.rs b/src/libstd/sys/sgx/mod.rs
index 397dd496ae8..a4968ff7d4f 100644
--- a/src/libstd/sys/sgx/mod.rs
+++ b/src/libstd/sys/sgx/mod.rs
@@ -30,7 +30,7 @@ pub mod rwlock;
 pub mod stack_overflow;
 pub mod stdio;
 pub mod thread;
-pub mod thread_local;
+pub mod thread_local_key;
 pub mod time;
 
 pub use crate::sys_common::os_str_bytes as os_str;
diff --git a/src/libstd/sys/sgx/thread_local.rs b/src/libstd/sys/sgx/thread_local_key.rs
index b21784475f0..b21784475f0 100644
--- a/src/libstd/sys/sgx/thread_local.rs
+++ b/src/libstd/sys/sgx/thread_local_key.rs