Add libc::consts::os::posix01::PTHREAD_STACK_MIN

Represents the minimum size of a thread's stack.  As such, it's both
platform and architecture-specific.

I put it under posix01 even though it predates POSIX.1-2001 by some
years.  I believe it was first formalized in SUSv2.  I doubt anyone
cares, though.
This commit is contained in:
Ben Noordhuis 2014-01-28 11:48:30 +01:00
parent f910a977db
commit 464b2e2364

View File

@ -2174,7 +2174,7 @@ pub mod consts {
pub static EDQUOT: c_int = 1133;
}
pub mod posix01 {
use libc::types::os::arch::c95::c_int;
use libc::types::os::arch::c95::{c_int, size_t};
pub static SIGTRAP : c_int = 5;
@ -2228,6 +2228,17 @@ pub mod consts {
pub static PTHREAD_CREATE_JOINABLE: c_int = 0;
pub static PTHREAD_CREATE_DETACHED: c_int = 1;
#[cfg(target_os = "android")]
pub static PTHREAD_STACK_MIN: size_t = 8192;
#[cfg(target_arch = "arm", target_os = "linux")]
#[cfg(target_arch = "x86", target_os = "linux")]
#[cfg(target_arch = "x86_64", target_os = "linux")]
pub static PTHREAD_STACK_MIN: size_t = 16384;
#[cfg(target_arch = "mips", target_os = "linux")]
pub static PTHREAD_STACK_MIN: size_t = 131072;
pub static CLOCK_REALTIME: c_int = 0;
pub static CLOCK_MONOTONIC: c_int = 1;
}
@ -2608,7 +2619,7 @@ pub mod consts {
pub static ELAST : c_int = 99;
}
pub mod posix01 {
use libc::types::os::arch::c95::c_int;
use libc::types::os::arch::c95::{c_int, size_t};
pub static SIGTRAP : c_int = 5;
@ -2662,6 +2673,14 @@ pub mod consts {
pub static PTHREAD_CREATE_JOINABLE: c_int = 0;
pub static PTHREAD_CREATE_DETACHED: c_int = 1;
#[cfg(target_arch = "arm")]
pub static PTHREAD_STACK_MIN: size_t = 4096;
#[cfg(target_arch = "mips")]
#[cfg(target_arch = "x86")]
#[cfg(target_arch = "x86_64")]
pub static PTHREAD_STACK_MIN: size_t = 2048;
pub static CLOCK_REALTIME: c_int = 0;
pub static CLOCK_MONOTONIC: c_int = 4;
}
@ -2990,7 +3009,7 @@ pub mod consts {
pub static ELAST : c_int = 106;
}
pub mod posix01 {
use libc::types::os::arch::c95::c_int;
use libc::types::os::arch::c95::{c_int, size_t};
pub static SIGTRAP : c_int = 5;
@ -3043,6 +3062,7 @@ pub mod consts {
pub static PTHREAD_CREATE_JOINABLE: c_int = 1;
pub static PTHREAD_CREATE_DETACHED: c_int = 2;
pub static PTHREAD_STACK_MIN: size_t = 8192;
}
pub mod posix08 {
}