Skip to content

Commit dc0a182

Browse files
committed
adjust value for minimal thread stack size
1 parent 3a1c83c commit dc0a182

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/unix/uclibc/x86_64/l4re.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// L4Re specifics
22
/// This module contains definitions required by various L4Re libc backends.
3-
/// Some of them are formally not part of the libc, but are a dependency of the libc and hence we
4-
/// should provide them here.
3+
/// Some of them are formally not part of the libc, but are a dependency of the
4+
/// libc and hence we should provide them here.
55
66
pub type l4_umword_t = ::c_ulong; // Unsigned machine word.
77

@@ -41,3 +41,6 @@ pub struct pthread_attr_t {
4141
pub create_flags: ::c_uint,
4242
}
4343

44+
// L4Re requires a min stack size of 64k; that isn't defined in uClibc, but
45+
// somewhere in the core libraries. uClibc wants 16k, but that's not enough.
46+
pub const PTHREAD_STACK_MIN: usize = 65536;

src/unix/uclibc/x86_64/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ s! {
139139
pub struct stat {
140140
pub st_dev: ::c_ulong,
141141
pub st_ino: ::ino_t,
142-
// According to uclibc/libc/sysdeps/linux/x86_64/bits/stat.h, order of nlink and mode are
143-
// swapped on 64 bit systems.
142+
// According to uclibc/libc/sysdeps/linux/x86_64/bits/stat.h, order of
143+
// nlink and mode are swapped on 64 bit systems.
144144
pub st_nlink: ::nlink_t,
145145
pub st_mode: ::mode_t,
146146
pub st_uid: ::uid_t,
@@ -323,8 +323,8 @@ pub const O_EXCL: ::c_int = 0200;
323323
pub const O_NONBLOCK: ::c_int = 04000;
324324
pub const O_TRUNC: ::c_int = 01000;
325325
pub const NCCS: usize = 32;
326-
pub const PTHREAD_STACK_MIN: usize = 16384;
327326
pub const SIG_SETMASK: ::c_int = 2; // Set the set of blocked signals
327+
pub const PTHREAD_STACK_MIN: usize = 16384;
328328
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
329329
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
330330
pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;

0 commit comments

Comments
 (0)