aboutsummaryrefslogtreecommitdiff
path: root/ctr-std/src/sys/windows/thread.rs
diff options
context:
space:
mode:
authorFenrir <[email protected]>2018-08-19 17:48:00 -0600
committerFenrir <[email protected]>2018-08-19 17:56:18 -0600
commit5d28bfcfd6086c3328837de9695099ea39048d0d (patch)
treea514fde042ff2a504a03305bfe0894ff8cd8d47e /ctr-std/src/sys/windows/thread.rs
parentUpdate for latest nightly 2018-06-09 (#70) (diff)
downloadctru-rs-5d28bfcfd6086c3328837de9695099ea39048d0d.tar.xz
ctru-rs-5d28bfcfd6086c3328837de9695099ea39048d0d.zip
Update for nightly-2018-08-18
Diffstat (limited to 'ctr-std/src/sys/windows/thread.rs')
-rw-r--r--ctr-std/src/sys/windows/thread.rs5
1 files changed, 3 insertions, 2 deletions
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<FnBox() + 'a>)
+ pub unsafe fn new<'a>(stack: usize, p: Box<dyn FnBox() + 'a>)
-> io::Result<Thread> {
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())