提交 8b48b247 编写于 作者: B bors

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
......@@ -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 @@ fn _tlv_atexit(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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册