Skip to content

Commit 5d526f6

Browse files
committed
Take sys/vxworks/thread from sys/unix instead.
1 parent c8628f4 commit 5d526f6

File tree

3 files changed

+7
-158
lines changed

3 files changed

+7
-158
lines changed

library/std/src/sys/unix/thread.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ use crate::ptr;
66
use crate::sys::{os, stack_overflow};
77
use crate::time::Duration;
88

9-
#[cfg(not(target_os = "l4re"))]
9+
#[cfg(not(any(target_os = "l4re", target_os = "vxworks")))]
1010
pub const DEFAULT_MIN_STACK_SIZE: usize = 2 * 1024 * 1024;
1111
#[cfg(target_os = "l4re")]
1212
pub const DEFAULT_MIN_STACK_SIZE: usize = 1024 * 1024;
13+
#[cfg(target_os = "vxworks")]
14+
pub const DEFAULT_MIN_STACK_SIZE: usize = 256 * 1024;
1315

1416
pub struct Thread {
1517
id: libc::pthread_t,
@@ -152,10 +154,11 @@ impl Thread {
152154
target_os = "haiku",
153155
target_os = "l4re",
154156
target_os = "emscripten",
155-
target_os = "redox"
157+
target_os = "redox",
158+
target_os = "vxworks"
156159
))]
157160
pub fn set_name(_name: &CStr) {
158-
// Newlib, Haiku, and Emscripten have no way to set a thread name.
161+
// Newlib, Haiku, Emscripten, and VxWorks have no way to set a thread name.
159162
}
160163
#[cfg(target_os = "fuchsia")]
161164
pub fn set_name(_name: &CStr) {

library/std/src/sys/vxworks/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ pub mod rwlock;
3131
#[path = "../unix/stack_overflow.rs"]
3232
pub mod stack_overflow;
3333
pub mod stdio;
34+
#[path = "../unix/thread.rs"]
3435
pub mod thread;
3536
pub mod thread_local_dtor;
3637
pub mod thread_local_key;

library/std/src/sys/vxworks/thread.rs

Lines changed: 0 additions & 155 deletions
This file was deleted.

0 commit comments

Comments
 (0)