2020-07-16 05:55:03 -05:00
|
|
|
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
|
2020-07-17 12:15:33 -05:00
|
|
|
Subject: [PATCH] Remove usage of extern_weak in thread_local_dtor
|
2020-07-16 05:55:03 -05:00
|
|
|
|
|
|
|
---
|
2020-07-30 07:58:27 -05:00
|
|
|
library/std/src/sys/unix/thread_local_dtor.rs | 20 --------------------
|
2020-07-16 05:55:03 -05:00
|
|
|
1 files changed, 0 insertions(+), 20 deletions(-)
|
|
|
|
|
2020-07-30 07:58:27 -05:00
|
|
|
diff --git a/library/std/src/sys/unix/thread_local_dtor.rs b/library/std/src/sys/unix/thread_local_dtor.rs
|
2020-07-16 05:55:03 -05:00
|
|
|
index 8730b4d..8d6e3d5 100644
|
2020-07-30 07:58:27 -05:00
|
|
|
--- a/library/std/src/sys/unix/thread_local_dtor.rs
|
|
|
|
+++ b/library/std/src/sys/unix/thread_local_dtor.rs
|
2020-07-16 05:55:03 -05:00
|
|
|
@@ -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;
|
2020-07-17 12:15:33 -05:00
|
|
|
use crate::sys_common::thread_local_dtor::register_dtor_fallback;
|
2020-07-16 05:55:03 -05:00
|
|
|
|
|
|
|
- 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
|
|
|
|
|