diff options
| author | Jeremy Soller <jackpot51@gmail.com> | 2016-10-30 16:14:47 -0600 |
|---|---|---|
| committer | Jeremy Soller <jackpot51@gmail.com> | 2016-10-30 16:14:47 -0600 |
| commit | 4edcddfb618a6d684d1f3289706ecc7794b30278 (patch) | |
| tree | 4b7bc9d8fc70baba2261135de9c514b5e1b4018e /src/libstd/sys | |
| parent | 37bfef023dab045852ea577dbe40693147a810f5 (diff) | |
| download | rust-4edcddfb618a6d684d1f3289706ecc7794b30278.tar.gz rust-4edcddfb618a6d684d1f3289706ecc7794b30278.zip | |
Implement TLS scoped keys, compiler builtins
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/redox/thread_local.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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>)> { |
