diff options
| author | Tatsuyuki Ishi <ishitatsuyuki@gmail.com> | 2018-02-27 16:51:12 +0900 |
|---|---|---|
| committer | Tatsuyuki Ishi <ishitatsuyuki@gmail.com> | 2018-03-18 23:05:28 +0900 |
| commit | e85c9227c2e913b71f0d7b6cc2322d7897f28554 (patch) | |
| tree | 09166f2288b127880f94b3d54360ab645d1fbb89 /src/libstd/sys_common | |
| parent | 8aa27ee30972f16320ae4a8887c8f54616fff819 (diff) | |
| download | rust-e85c9227c2e913b71f0d7b6cc2322d7897f28554.tar.gz rust-e85c9227c2e913b71f0d7b6cc2322d7897f28554.zip | |
rustc_driver: get rid of extra thread on Unix
Diffstat (limited to 'src/libstd/sys_common')
| -rw-r--r-- | src/libstd/sys_common/thread_info.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/sys_common/thread_info.rs b/src/libstd/sys_common/thread_info.rs index 6a2b6742367..d75cbded734 100644 --- a/src/libstd/sys_common/thread_info.rs +++ b/src/libstd/sys_common/thread_info.rs @@ -50,3 +50,7 @@ pub fn set(stack_guard: Option<Guard>, thread: Thread) { thread, })); } + +pub fn reset_guard(stack_guard: Option<Guard>) { + THREAD_INFO.with(move |c| c.borrow_mut().as_mut().unwrap().stack_guard = stack_guard); +} |
