about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorJeremy Soller <jackpot51@gmail.com>2016-10-30 16:14:47 -0600
committerJeremy Soller <jackpot51@gmail.com>2016-10-30 16:14:47 -0600
commit4edcddfb618a6d684d1f3289706ecc7794b30278 (patch)
tree4b7bc9d8fc70baba2261135de9c514b5e1b4018e /src/libstd
parent37bfef023dab045852ea577dbe40693147a810f5 (diff)
downloadrust-4edcddfb618a6d684d1f3289706ecc7794b30278.tar.gz
rust-4edcddfb618a6d684d1f3289706ecc7794b30278.zip
Implement TLS scoped keys, compiler builtins
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/lib.rs2
-rw-r--r--src/libstd/sys/redox/thread_local.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 219f244be29..82a719693ec 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -322,7 +322,7 @@ extern crate unwind;
 extern crate alloc_system;
 
 // compiler-rt intrinsics
-//REDOX TODO extern crate compiler_builtins;
+extern crate compiler_builtins;
 
 // Make std testable by not duplicating lang items and other globals. See #2912
 #[cfg(test)] extern crate std as realstd;
diff --git a/src/libstd/sys/redox/thread_local.rs b/src/libstd/sys/redox/thread_local.rs
index b12ffebbcac..7958437a30a 100644
--- a/src/libstd/sys/redox/thread_local.rs
+++ b/src/libstd/sys/redox/thread_local.rs
@@ -17,10 +17,10 @@ pub type Key = usize;
 
 type Dtor = unsafe extern fn(*mut u8);
 
-//TODO: Implement this properly
-
+#[thread_local]
 static mut NEXT_KEY: Key = 0;
 
+#[thread_local]
 static mut LOCALS: *mut BTreeMap<Key, (*mut u8, Option<Dtor>)> = ptr::null_mut();
 
 unsafe fn locals() -> &'static mut BTreeMap<Key, (*mut u8, Option<Dtor>)> {