Skip to content

Commit

Permalink
use #[thread_local] on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
thestinger committed Apr 14, 2014
1 parent ecc774f commit d617e6b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/libstd/rt/local_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ use cast;
use ops::Drop;
use ptr::RawPtr;

#[cfg(windows)] // mingw-w32 doesn't like thread_local things
#[cfg(target_os = "android")] // see #10686
pub use self::native::*;

#[cfg(not(windows), not(target_os = "android"))]
#[cfg(not(target_os = "android"))]
pub use self::compiled::*;

/// Encapsulates a borrowed value. When this value goes out of scope, the
Expand Down Expand Up @@ -76,7 +75,7 @@ pub unsafe fn borrow<T>() -> Borrowed<T> {
/// implemented using LLVM's thread_local attribute which isn't necessarily
/// working on all platforms. This implementation is faster, however, so we use
/// it wherever possible.
#[cfg(not(windows), not(target_os = "android"))]
#[cfg(not(target_os = "android"))]
pub mod compiled {
use cast;
use option::{Option, Some, None};
Expand Down

4 comments on commit d617e6b

@bors
Copy link
Contributor

@bors bors commented on d617e6b Apr 15, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on d617e6b Apr 15, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging thestinger/rust/thread_local = d617e6b into auto

@bors
Copy link
Contributor

@bors bors commented on d617e6b Apr 15, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thestinger/rust/thread_local = d617e6b merged ok, testing candidate = 1f1013c2

@bors
Copy link
Contributor

@bors bors commented on d617e6b Apr 15, 2014

Please sign in to comment.