diff options
| author | Amanieu d'Antras <amanieu@gmail.com> | 2016-01-02 22:50:50 +0000 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2016-01-11 10:38:36 +0000 |
| commit | e304fb43a3533d9ed79be91e217270747ca50edf (patch) | |
| tree | 7301ab8a0ba5a700a216d2dfd2f448e4024a868e /src/libstd/thread | |
| parent | 5446139387fe21928dfbd3145aade01cf26829d4 (diff) | |
| download | rust-e304fb43a3533d9ed79be91e217270747ca50edf.tar.gz rust-e304fb43a3533d9ed79be91e217270747ca50edf.zip | |
Replace no_elf_tls with target_thread_local
Diffstat (limited to 'src/libstd/thread')
| -rw-r--r-- | src/libstd/thread/scoped_tls.rs | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/src/libstd/thread/scoped_tls.rs b/src/libstd/thread/scoped_tls.rs index 2c92bc504c8..dc0bc6dfe02 100644 --- a/src/libstd/thread/scoped_tls.rs +++ b/src/libstd/thread/scoped_tls.rs @@ -87,32 +87,9 @@ macro_rules! scoped_thread_local { issue = "0")] #[macro_export] #[allow_internal_unstable] -#[cfg(no_elf_tls)] macro_rules! __scoped_thread_local_inner { ($t:ty) => {{ - static _KEY: $crate::thread::__ScopedKeyInner<$t> = - $crate::thread::__ScopedKeyInner::new(); - fn _getit() -> &'static $crate::thread::__ScopedKeyInner<$t> { &_KEY } - $crate::thread::ScopedKey::new(_getit) - }} -} - -#[doc(hidden)] -#[unstable(feature = "thread_local_internals", - reason = "should not be necessary", - issue = "0")] -#[macro_export] -#[allow_internal_unstable] -#[cfg(not(no_elf_tls))] -macro_rules! __scoped_thread_local_inner { - ($t:ty) => {{ - #[cfg_attr(not(any(windows, - target_os = "android", - target_os = "ios", - target_os = "netbsd", - target_os = "openbsd", - target_arch = "aarch64")), - thread_local)] + #[cfg_attr(target_thread_local, thread_local)] static _KEY: $crate::thread::__ScopedKeyInner<$t> = $crate::thread::__ScopedKeyInner::new(); fn _getit() -> &'static $crate::thread::__ScopedKeyInner<$t> { &_KEY } @@ -221,13 +198,7 @@ impl<T> ScopedKey<T> { } } -#[cfg(not(any(windows, - target_os = "android", - target_os = "ios", - target_os = "netbsd", - target_os = "openbsd", - target_arch = "aarch64", - no_elf_tls)))] +#[cfg(target_thread_local)] #[doc(hidden)] mod imp { use cell::Cell; @@ -246,13 +217,7 @@ mod imp { } } -#[cfg(any(windows, - target_os = "android", - target_os = "ios", - target_os = "netbsd", - target_os = "openbsd", - target_arch = "aarch64", - no_elf_tls))] +#[cfg(not(target_thread_local))] #[doc(hidden)] mod imp { use cell::Cell; |
