about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorBaoshan Pang <baoshan.pang@windriver.com>2019-08-27 10:13:59 -0700
committerBaoshan Pang <baoshan.pang@windriver.com>2019-08-27 10:13:59 -0700
commit3b2c14736d6d8fc44cf60588ed41a67eaf9459ad (patch)
treea9bbff7ab5957b6c53042ed52f6cd358b3993044 /src/libstd/sys
parent602bea3c12b21e070a71001815a9bbf51cbd0556 (diff)
downloadrust-3b2c14736d6d8fc44cf60588ed41a67eaf9459ad.tar.gz
rust-3b2c14736d6d8fc44cf60588ed41a67eaf9459ad.zip
remove the reference to __cxa_thread_atexit_impl
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/vxworks/fast_thread_local.rs27
1 files changed, 2 insertions, 25 deletions
diff --git a/src/libstd/sys/vxworks/fast_thread_local.rs b/src/libstd/sys/vxworks/fast_thread_local.rs
index f5a2e263d25..2e021980778 100644
--- a/src/libstd/sys/vxworks/fast_thread_local.rs
+++ b/src/libstd/sys/vxworks/fast_thread_local.rs
@@ -1,33 +1,10 @@
+// Copyright (c) 2019 Wind River Systems, Inc.
+
 #![cfg(target_thread_local)]
 #![unstable(feature = "thread_local_internals", issue = "0")]
 
-// Since what appears to be glibc 2.18 this symbol has been shipped which
-// GCC and clang both use to invoke destructors in thread_local globals, so
-// let's do the same!
-//
-// Note, however, that we run on lots older linuxes, as well as cross
-// compiling from a newer linux to an older linux, so we also have a
-// fallback implementation to use as well.
-//
-// Due to rust-lang/rust#18804, make sure this is not generic!
 pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern fn(*mut u8)) {
-    use crate::mem;
     use crate::sys_common::thread_local::register_dtor_fallback;
-
-    extern {
-        #[linkage = "extern_weak"]
-        static __dso_handle: *mut u8;
-        #[linkage = "extern_weak"]
-        static __cxa_thread_atexit_impl: *const libc::c_void;
-    }
-    if !__cxa_thread_atexit_impl.is_null() {
-        type F = unsafe extern fn(dtor: unsafe extern fn(*mut u8),
-                                  arg: *mut u8,
-                                  dso_handle: *mut u8) -> libc::c_int;
-        mem::transmute::<*const libc::c_void, F>(__cxa_thread_atexit_impl)
-            (dtor, t, &__dso_handle as *const _ as *mut _);
-        return
-    }
     register_dtor_fallback(t, dtor);
 }