Skip to content

Commit 5e89d1c

Browse files
authored
Rollup merge of rust-lang#64129 - Wind-River:master_003, r=alexcrichton
vxWorks: set DEFAULT_MIN_STACK_SIZE to 256K and use min_stack to pass initial stack size to rtpSpawn vxWorks: set DEFAULT_MIN_STACK_SIZE to 256K and use min_stack to pass initial stack size to rtpSpawn r? @alexcrichton cc @n-salim
2 parents 8433952 + 665291c commit 5e89d1c

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

Diff for: src/libstd/sys/vxworks/fast_thread_local.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// Copyright (c) 2019 Wind River Systems, Inc.
2-
31
#![cfg(target_thread_local)]
42
#![unstable(feature = "thread_local_internals", issue = "0")]
53

Diff for: src/libstd/sys/vxworks/process/process_vxworks.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use crate::sys;
55
use crate::sys::cvt;
66
use crate::sys::process::rtp;
77
use crate::sys::process::process_common::*;
8+
use crate::sys_common::thread;
89

910
////////////////////////////////////////////////////////////////////////////////
1011
// Command
@@ -57,8 +58,7 @@ impl Command {
5758
self.get_argv().as_ptr() as *const _, // argv
5859
*sys::os::environ() as *const *const c_char,
5960
100 as c_int, // initial priority
60-
0x16000, // initial stack size. 0 defaults
61-
// to 0x4000 in 32 bit and 0x8000 in 64 bit
61+
thread::min_stack(), // initial stack size.
6262
0, // options
6363
0 // task options
6464
);

Diff for: src/libstd/sys/vxworks/thread.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::time::Duration;
88

99
use crate::sys_common::thread::*;
1010

11-
pub const DEFAULT_MIN_STACK_SIZE: usize = 2 * 1024 * 1024;
11+
pub const DEFAULT_MIN_STACK_SIZE: usize = 0x40000; // 256K
1212

1313
pub struct Thread {
1414
id: libc::pthread_t,

0 commit comments

Comments
 (0)