about summary refs log tree commit diff
path: root/src/libstd/sys/windows/stack_overflow.rs
diff options
context:
space:
mode:
authorAaron Turon <aturon@mozilla.com>2014-12-06 18:34:37 -0800
committerAaron Turon <aturon@mozilla.com>2014-12-18 23:31:51 -0800
commit43ae4b3301cc0605839778ecf59effb32b752e33 (patch)
treeaa111f5adc1eaa1e996847e1437d1b1b40821ce0 /src/libstd/sys/windows/stack_overflow.rs
parent14c1a103bc3f78721df1dc860a75a477c8275e3a (diff)
downloadrust-43ae4b3301cc0605839778ecf59effb32b752e33.tar.gz
rust-43ae4b3301cc0605839778ecf59effb32b752e33.zip
Fallout from new thread API
Diffstat (limited to 'src/libstd/sys/windows/stack_overflow.rs')
-rw-r--r--src/libstd/sys/windows/stack_overflow.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libstd/sys/windows/stack_overflow.rs b/src/libstd/sys/windows/stack_overflow.rs
index e3d96a054f4..63b5b6f5863 100644
--- a/src/libstd/sys/windows/stack_overflow.rs
+++ b/src/libstd/sys/windows/stack_overflow.rs
@@ -8,15 +8,13 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use rt::local::Local;
-use rt::task::Task;
 use rt::util::report_overflow;
 use core::prelude::*;
 use ptr;
 use mem;
 use libc;
 use libc::types::os::arch::extra::{LPVOID, DWORD, LONG, BOOL};
-use sys_common::stack;
+use sys_common::{stack, thread_info};
 
 pub struct Handler {
     _data: *mut libc::c_void
@@ -37,8 +35,7 @@ impl Drop for Handler {
 // guard page doesn't exist. None is returned if there's currently
 // no local task.
 unsafe fn get_task_guard_page() -> Option<uint> {
-    let task: Option<*mut Task> = Local::try_unsafe_borrow();
-    task.map(|task| (&*task).stack_guard().unwrap_or(0))
+    thread_info::stack_guard()
 }
 
 // This is initialized in init() and only read from after