We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 60c1ee7 + fc8bb9c commit db54765Copy full SHA for db54765
src/libstd/sys/windows/c.rs
@@ -296,6 +296,8 @@ pub const PIPE_READMODE_BYTE: DWORD = 0x00000000;
296
297
pub const FD_SETSIZE: usize = 64;
298
299
+pub const STACK_SIZE_PARAM_IS_A_RESERVATION: DWORD = 0x00010000;
300
+
301
#[repr(C)]
302
#[cfg(not(target_pointer_width = "64"))]
303
pub struct WSADATA {
src/libstd/sys/windows/thread.rs
@@ -42,7 +42,8 @@ impl Thread {
42
let stack_size = (stack + 0xfffe) & (!0xfffe);
43
let ret = c::CreateThread(ptr::null_mut(), stack_size,
44
thread_start, &*p as *const _ as *mut _,
45
- 0, ptr::null_mut());
+ c::STACK_SIZE_PARAM_IS_A_RESERVATION,
46
+ ptr::null_mut());
47
48
return if ret as usize == 0 {
49
Err(io::Error::last_os_error())
0 commit comments