about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-07-13 08:00:16 +0000
committerbors <bors@rust-lang.org>2018-07-13 08:00:16 +0000
commit8b48b247dc24a40ce499415370bfd2b6cefa3a1b (patch)
treec4e76907ff604dd5c021f9550f2d437d17cb28d7 /src/libstd/sys
parent68c39b9fec17846005da9a8e42991422c08c377c (diff)
parenta6fa656555583524d3c4e6cde702e1b63578cc44 (diff)
downloadrust-8b48b247dc24a40ce499415370bfd2b6cefa3a1b.tar.gz
rust-8b48b247dc24a40ce499415370bfd2b6cefa3a1b.zip
Auto merge of #52281 - cramertj:fast-tls, r=alexcrichton
Use fast TLS on Fuchsia

I'm not sure why Fuchsia was separated here, but we provide these symbols, and tests are passing in QEMU with this change. cc @raphlinus.

r? @alexcrichton
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/unix/fast_thread_local.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/libstd/sys/unix/fast_thread_local.rs b/src/libstd/sys/unix/fast_thread_local.rs
index 6cdbe5df75d..d59d800a579 100644
--- a/src/libstd/sys/unix/fast_thread_local.rs
+++ b/src/libstd/sys/unix/fast_thread_local.rs
@@ -20,7 +20,7 @@
 // fallback implementation to use as well.
 //
 // Due to rust-lang/rust#18804, make sure this is not generic!
-#[cfg(target_os = "linux")]
+#[cfg(any(target_os = "linux", target_os = "fuchsia"))]
 pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern fn(*mut u8)) {
     use libc;
     use mem;
@@ -55,11 +55,6 @@ pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern fn(*mut u8)) {
     _tlv_atexit(dtor, t);
 }
 
-// Just use the thread_local fallback implementation, at least until there's
-// a more direct implementation.
-#[cfg(target_os = "fuchsia")]
-pub use sys_common::thread_local::register_dtor_fallback as register_dtor;
-
 pub fn requires_move_before_drop() -> bool {
     // The macOS implementation of TLS apparently had an odd aspect to it
     // where the pointer we have may be overwritten while this destructor