about summary refs log tree commit diff
path: root/src/libstd/sys/windows/stack_overflow.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-31 10:20:31 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-31 10:20:31 -0800
commitaec67c2ee0f673ea7b0e21c2fe7e0f26a523d823 (patch)
tree032a8ec1398c7334c20b791a4c4c460feb5e2c79 /src/libstd/sys/windows/stack_overflow.rs
parent582cba183f18eea5c40b6c035d63ad449a9e8604 (diff)
downloadrust-aec67c2ee0f673ea7b0e21c2fe7e0f26a523d823.tar.gz
rust-aec67c2ee0f673ea7b0e21c2fe7e0f26a523d823.zip
Revert "std: Re-enable at_exit()"
This reverts commit 9e224c2bf18ebf8f871efb2e1aba43ed7970ebb7.

Conflicts:
	src/libstd/sys/windows/os.rs
Diffstat (limited to 'src/libstd/sys/windows/stack_overflow.rs')
-rw-r--r--src/libstd/sys/windows/stack_overflow.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libstd/sys/windows/stack_overflow.rs b/src/libstd/sys/windows/stack_overflow.rs
index ab092f5a243..bdf2e0bccb1 100644
--- a/src/libstd/sys/windows/stack_overflow.rs
+++ b/src/libstd/sys/windows/stack_overflow.rs
@@ -14,7 +14,7 @@ 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
@@ -30,6 +30,14 @@ impl Drop for Handler {
     fn drop(&mut self) {}
 }
 
+// get_task_info is called from an exception / signal handler.
+// It returns the guard page of the current task or 0 if that
+// guard page doesn't exist. None is returned if there's currently
+// no local task.
+unsafe fn get_task_guard_page() -> uint {
+    thread_info::stack_guard()
+}
+
 // This is initialized in init() and only read from after
 static mut PAGE_SIZE: uint = 0;