diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-12-30 16:26:24 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-12-30 16:26:24 -0800 |
| commit | dd0f29ad0f3ddc48f36340cd0abff4712e882a3e (patch) | |
| tree | 71614fc4b8abe510c2c3546eef6e6a0853f1075e /src/libstd/thread_local | |
| parent | 49f14d36e131bee318340d638aa4f94d8cf872f6 (diff) | |
| parent | 262c1efe6352a3e4dba4d8aebc4d9bd96849cd71 (diff) | |
| download | rust-dd0f29ad0f3ddc48f36340cd0abff4712e882a3e.tar.gz rust-dd0f29ad0f3ddc48f36340cd0abff4712e882a3e.zip | |
rollup merge of #20353: alexcrichton/snapshots
Diffstat (limited to 'src/libstd/thread_local')
| -rw-r--r-- | src/libstd/thread_local/mod.rs | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/libstd/thread_local/mod.rs b/src/libstd/thread_local/mod.rs index 4cfa2709352..14dd2a1ac9b 100644 --- a/src/libstd/thread_local/mod.rs +++ b/src/libstd/thread_local/mod.rs @@ -189,22 +189,7 @@ macro_rules! __thread_local_inner { } }; - #[cfg(all(stage0, not(any(target_os = "macos", target_os = "linux"))))] - const INIT: ::std::thread_local::KeyInner<$t> = { - unsafe extern fn __destroy(ptr: *mut u8) { - ::std::thread_local::destroy_value::<$t>(ptr); - } - - ::std::thread_local::KeyInner { - inner: ::std::cell::UnsafeCell { value: $init }, - os: ::std::thread_local::OsStaticKey { - inner: ::std::thread_local::OS_INIT_INNER, - dtor: ::std::option::Option::Some(__destroy), - }, - } - }; - - #[cfg(all(not(stage0), not(any(target_os = "macos", target_os = "linux"))))] + #[cfg(all(not(any(target_os = "macos", target_os = "linux"))))] const INIT: ::std::thread_local::KeyInner<$t> = { unsafe extern fn __destroy(ptr: *mut u8) { ::std::thread_local::destroy_value::<$t>(ptr); @@ -346,16 +331,10 @@ mod imp { // *should* be the case that this loop always terminates because we // provide the guarantee that a TLS key cannot be set after it is // flagged for destruction. - #[cfg(not(stage0))] static DTORS: os::StaticKey = os::StaticKey { inner: os::INIT_INNER, dtor: Some(run_dtors as unsafe extern "C" fn(*mut u8)), }; - #[cfg(stage0)] - static DTORS: os::StaticKey = os::StaticKey { - inner: os::INIT_INNER, - dtor: Some(run_dtors), - }; type List = Vec<(*mut u8, unsafe extern fn(*mut u8))>; if DTORS.get().is_null() { let v: Box<List> = box Vec::new(); |
