Skip to content

vxWorks: set DEFAULT_MIN_STACK_SIZE to 256K and use min_stack to pass initial stack size to rtpSpawn #64129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 11, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/libstd/sys/vxworks/process/process_vxworks.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
// Copyright (c) 2019 Wind River Systems, Inc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

License?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intent is "the usual Rust license", i.e. Wind River is not claiming any proprietary rights here. But I'm not a lawyer, let me check with someone who can give a better answer and get back to you.


use crate::io::{self, Error, ErrorKind};
use libc::{self, c_int, c_char};
use libc::{RTP_ID};
use crate::sys;
use crate::sys::cvt;
use crate::sys::process::rtp;
use crate::sys::process::process_common::*;
use crate::sys_common::thread;

////////////////////////////////////////////////////////////////////////////////
// Command
Expand Down Expand Up @@ -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
);
Expand Down
4 changes: 3 additions & 1 deletion src/libstd/sys/vxworks/thread.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) 2019 Wind River Systems, Inc.

use crate::cmp;
use crate::ffi::CStr;
use crate::io;
Expand All @@ -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,
Expand Down