about summary refs log tree commit diff
path: root/src/libstd/sys/windows
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-01-31 03:57:01 +0000
committerbors <bors@rust-lang.org>2015-01-31 03:57:01 +0000
commit474b324eda10440d6568ef872a7307d38e7de95b (patch)
tree53fc5aaa615f1c6e5abd757e42a75b3d19ce3abb /src/libstd/sys/windows
parent1d00c545ede609b9d43fdf9f252c15da5a66dac7 (diff)
parente8fd9d3d0bf0f4974460337df29c0d3ceb514987 (diff)
downloadrust-474b324eda10440d6568ef872a7307d38e7de95b.tar.gz
rust-474b324eda10440d6568ef872a7307d38e7de95b.zip
Auto merge of #21791 - alexcrichton:rollup, r=alexcrichton
Diffstat (limited to 'src/libstd/sys/windows')
-rw-r--r--src/libstd/sys/windows/backtrace.rs2
-rw-r--r--src/libstd/sys/windows/stack_overflow.rs2
-rw-r--r--src/libstd/sys/windows/thread.rs7
-rw-r--r--src/libstd/sys/windows/thread_local.rs2
4 files changed, 10 insertions, 3 deletions
diff --git a/src/libstd/sys/windows/backtrace.rs b/src/libstd/sys/windows/backtrace.rs
index a186465f234..1be1a412ffa 100644
--- a/src/libstd/sys/windows/backtrace.rs
+++ b/src/libstd/sys/windows/backtrace.rs
@@ -333,7 +333,7 @@ pub fn write(w: &mut Writer) -> IoResult<()> {
     let _c = Cleanup { handle: process, SymCleanup: SymCleanup };
 
     // And now that we're done with all the setup, do the stack walking!
-    let mut i = 0i;
+    let mut i = 0;
     try!(write!(w, "stack backtrace:\n"));
     while StackWalk64(image, process, thread, &mut frame, &mut context,
                       ptr::null_mut(),
diff --git a/src/libstd/sys/windows/stack_overflow.rs b/src/libstd/sys/windows/stack_overflow.rs
index e8b447022cb..0cb4c573ae3 100644
--- a/src/libstd/sys/windows/stack_overflow.rs
+++ b/src/libstd/sys/windows/stack_overflow.rs
@@ -81,7 +81,7 @@ pub unsafe fn make_handler() -> Handler {
         panic!("failed to reserve stack space for exception handling");
     }
 
-    Handler { _data: 0i as *mut libc::c_void }
+    Handler { _data: 0 as *mut libc::c_void }
 }
 
 pub struct EXCEPTION_RECORD {
diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs
index 30707488b30..a94adcb3bc7 100644
--- a/src/libstd/sys/windows/thread.rs
+++ b/src/libstd/sys/windows/thread.rs
@@ -67,6 +67,13 @@ pub unsafe fn create(stack: uint, p: Thunk) -> rust_thread {
     return ret;
 }
 
+pub unsafe fn set_name(_name: &str) {
+    // Windows threads are nameless
+    // The names in MSVC debugger are obtained using a "magic" exception,
+    // which requires a use of MS C++ extensions.
+    // See https://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx
+}
+
 pub unsafe fn join(native: rust_thread) {
     use libc::consts::os::extra::INFINITE;
     WaitForSingleObject(native, INFINITE);
diff --git a/src/libstd/sys/windows/thread_local.rs b/src/libstd/sys/windows/thread_local.rs
index 655195a3c28..0f8ceed39a6 100644
--- a/src/libstd/sys/windows/thread_local.rs
+++ b/src/libstd/sys/windows/thread_local.rs
@@ -235,7 +235,7 @@ unsafe extern "system" fn on_tls_callback(h: LPVOID,
 
 unsafe fn run_dtors() {
     let mut any_run = true;
-    for _ in 0..5i {
+    for _ in 0..5 {
         if !any_run { break }
         any_run = false;
         let dtors = {