]> git.lizzy.rs Git - rust.git/commit
std: Lower abstractions for thread_local/at_exit
authorAlex Crichton <alex@alexcrichton.com>
Wed, 17 Dec 2014 22:37:38 +0000 (14:37 -0800)
committerAaron Turon <aturon@mozilla.com>
Fri, 19 Dec 2014 07:35:52 +0000 (23:35 -0800)
commit5759cff48e66bcf2bf2cf821211bdf683292d8f3
tree4532178a8794666d1d62300b42981a9ccdf3a49d
parenta27fbac86849e07a0a6c746869d8f78319bd3a16
std: Lower abstractions for thread_local/at_exit

The current implementations use `std::sync` primitives, but these primitives
currently end up relying on `thread_info` and a local `Thread` being available
(mainly for checking the panicking flag).

To get around this, this commit lowers the abstractions used by the windows
thread_local implementation as well as the at_exit_imp module. Both of these
modules now use a `sys::Mutex` and a `static mut` and manage the
allocation/locking manually.
src/libstd/rt/at_exit_imp.rs
src/libstd/sys/windows/thread_local.rs