diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-12-29 19:40:57 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-12-30 15:04:43 -0800 |
| commit | 262c1efe6352a3e4dba4d8aebc4d9bd96849cd71 (patch) | |
| tree | 4096f26993c2db2e0c95181170ef63f46cf3cb7e /src/libstd/thread_local/mod.rs | |
| parent | 023dfb0c898d851dee6ace2f8339b73b5287136b (diff) | |
| download | rust-262c1efe6352a3e4dba4d8aebc4d9bd96849cd71.tar.gz rust-262c1efe6352a3e4dba4d8aebc4d9bd96849cd71.zip | |
Register new snapshots
Diffstat (limited to 'src/libstd/thread_local/mod.rs')
| -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(); |
