From 5d28bfcfd6086c3328837de9695099ea39048d0d Mon Sep 17 00:00:00 2001 From: Fenrir Date: Sun, 19 Aug 2018 17:48:00 -0600 Subject: Update for nightly-2018-08-18 --- ctr-std/src/sys/windows/thread.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ctr-std/src/sys/windows/thread.rs') diff --git a/ctr-std/src/sys/windows/thread.rs b/ctr-std/src/sys/windows/thread.rs index b6f6330..85588cc 100644 --- a/ctr-std/src/sys/windows/thread.rs +++ b/ctr-std/src/sys/windows/thread.rs @@ -28,7 +28,7 @@ pub struct Thread { } impl Thread { - pub unsafe fn new<'a>(stack: usize, p: Box) + pub unsafe fn new<'a>(stack: usize, p: Box) -> io::Result { let p = box p; @@ -42,7 +42,8 @@ impl Thread { let stack_size = (stack + 0xfffe) & (!0xfffe); let ret = c::CreateThread(ptr::null_mut(), stack_size, thread_start, &*p as *const _ as *mut _, - 0, ptr::null_mut()); + c::STACK_SIZE_PARAM_IS_A_RESERVATION, + ptr::null_mut()); return if ret as usize == 0 { Err(io::Error::last_os_error()) -- cgit v1.2.3