46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
From 7496bb94a2fb2bc34629c9781c3bc3a470becaee Mon Sep 17 00:00:00 2001
|
|
From: bjorn3 <bjorn3@users.noreply.github.com>
|
|
Date: Fri, 10 Apr 2020 13:47:42 +0200
|
|
Subject: [PATCH] Remove usage of extern_weak in thread_local_dtor
|
|
|
|
---
|
|
library/std/src/sys/unix/thread_local_dtor.rs | 20 --------------------
|
|
1 files changed, 0 insertions(+), 20 deletions(-)
|
|
|
|
diff --git a/library/std/src/sys/unix/thread_local_dtor.rs b/library/std/src/sys/unix/thread_local_dtor.rs
|
|
index 8730b4d..8d6e3d5 100644
|
|
--- a/library/std/src/sys/unix/thread_local_dtor.rs
|
|
+++ b/library/std/src/sys/unix/thread_local_dtor.rs
|
|
@@ -15,28 +15,8 @@
|
|
target_os = "emscripten"
|
|
))]
|
|
pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) {
|
|
- use crate::mem;
|
|
use crate::sys_common::thread_local_dtor::register_dtor_fallback;
|
|
|
|
- extern "C" {
|
|
- #[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 "C" fn(
|
|
- dtor: unsafe extern "C" 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);
|
|
}
|
|
|
|
--
|
|
2.20.1
|
|
|