about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaoshan Pang <baoshan.pang@windriver.com>2019-09-01 17:56:36 -0700
committerBaoshan Pang <baoshan.pang@windriver.com>2019-09-01 19:20:37 -0700
commitdb576f8103ed0cdda4e77d977c1eab8456233e11 (patch)
tree216b27870b5b7e9f62f82b043dfe4fbddeaadf8e
parentd5ef9df032ec32c48d6c59050735352c48ff16f8 (diff)
downloadrust-db576f8103ed0cdda4e77d977c1eab8456233e11.tar.gz
rust-db576f8103ed0cdda4e77d977c1eab8456233e11.zip
vxWorks: set DEFAULT_MIN_STACK_SIZE to 256K and use min_stack to pass initial stack size to rtpSpawn
-rw-r--r--src/libstd/sys/vxworks/process/process_vxworks.rs6
-rw-r--r--src/libstd/sys/vxworks/thread.rs4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/libstd/sys/vxworks/process/process_vxworks.rs b/src/libstd/sys/vxworks/process/process_vxworks.rs
index b07966fa206..12aa7797468 100644
--- a/src/libstd/sys/vxworks/process/process_vxworks.rs
+++ b/src/libstd/sys/vxworks/process/process_vxworks.rs
@@ -1,3 +1,5 @@
+// Copyright (c) 2019 Wind River Systems, Inc.
+
 use crate::io::{self, Error, ErrorKind};
 use libc::{self, c_int, c_char};
 use libc::{RTP_ID};
@@ -5,6 +7,7 @@ use crate::sys;
 use crate::sys::cvt;
 use crate::sys::process::rtp;
 use crate::sys::process::process_common::*;
+use crate::sys_common::thread;
 
 ////////////////////////////////////////////////////////////////////////////////
 // Command
@@ -57,8 +60,7 @@ impl Command {
                 self.get_argv().as_ptr() as *const _, // argv
                 *sys::os::environ() as *const *const c_char,
                 100 as c_int,                         // initial priority
-                0x16000,                                    // initial stack size. 0 defaults
-                                                      // to 0x4000 in 32 bit and 0x8000 in 64 bit
+                thread::min_stack(),                  // initial stack size.
                 0,                                    // options
                 0                                     // task options
             );
diff --git a/src/libstd/sys/vxworks/thread.rs b/src/libstd/sys/vxworks/thread.rs
index ef896f6a6e8..f9305afdeb6 100644
--- a/src/libstd/sys/vxworks/thread.rs
+++ b/src/libstd/sys/vxworks/thread.rs
@@ -1,3 +1,5 @@
+// Copyright (c) 2019 Wind River Systems, Inc.
+
 use crate::cmp;
 use crate::ffi::CStr;
 use crate::io;
@@ -8,7 +10,7 @@ use crate::time::Duration;
 
 use crate::sys_common::thread::*;
 
-pub const DEFAULT_MIN_STACK_SIZE: usize = 2 * 1024 * 1024;
+pub const DEFAULT_MIN_STACK_SIZE: usize = 0x40000; // 256K
 
 pub struct Thread {
     id: libc::pthread_t,