Skip to content

Commit 8b48b24

Browse files
committed
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
2 parents 68c39b9 + a6fa656 commit 8b48b24

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/libstd/sys/unix/fast_thread_local.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// fallback implementation to use as well.
2121
//
2222
// Due to rust-lang/rust#18804, make sure this is not generic!
23-
#[cfg(target_os = "linux")]
23+
#[cfg(any(target_os = "linux", target_os = "fuchsia"))]
2424
pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern fn(*mut u8)) {
2525
use libc;
2626
use mem;
@@ -55,11 +55,6 @@ pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern fn(*mut u8)) {
5555
_tlv_atexit(dtor, t);
5656
}
5757

58-
// Just use the thread_local fallback implementation, at least until there's
59-
// a more direct implementation.
60-
#[cfg(target_os = "fuchsia")]
61-
pub use sys_common::thread_local::register_dtor_fallback as register_dtor;
62-
6358
pub fn requires_move_before_drop() -> bool {
6459
// The macOS implementation of TLS apparently had an odd aspect to it
6560
// where the pointer we have may be overwritten while this destructor

0 commit comments

Comments
 (0)