about summary refs log tree commit diff
path: root/src/libstd/sys_common/util.rs
diff options
context:
space:
mode:
authorTobias Schaffner <tschaff@genua.de>2017-09-09 11:09:34 +0200
committerSebastian Humenda <shumenda@gmx.de>2017-09-13 10:56:41 +0200
commitb2b50635172254777d16d0fc6112e6d5b68b63f2 (patch)
tree37e3b004a9dd7ab32ba846aab3ae738962e09259 /src/libstd/sys_common/util.rs
parent5d1a9d7ae761cb7fd88b37bab0d55f59379462ef (diff)
downloadrust-b2b50635172254777d16d0fc6112e6d5b68b63f2.tar.gz
rust-b2b50635172254777d16d0fc6112e6d5b68b63f2.zip
Move default stack min size to thread implementations
The default min stack size value is smaller on l4re and therefore
this value has to be different depending on the platform.
Diffstat (limited to 'src/libstd/sys_common/util.rs')
-rw-r--r--src/libstd/sys_common/util.rs21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/libstd/sys_common/util.rs b/src/libstd/sys_common/util.rs
index 41be6f43763..a391c7cc6ef 100644
--- a/src/libstd/sys_common/util.rs
+++ b/src/libstd/sys_common/util.rs
@@ -8,32 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use env;
 use fmt;
 use io::prelude::*;
-use sync::atomic::{self, Ordering};
 use sys::stdio::Stderr;
 use thread;
 
-pub fn min_stack() -> usize {
-    static MIN: atomic::AtomicUsize = atomic::AtomicUsize::new(0);
-    match MIN.load(Ordering::SeqCst) {
-        0 => {}
-        n => return n - 1,
-    }
-    let amt = env::var("RUST_MIN_STACK").ok().and_then(|s| s.parse().ok());
-    #[cfg(not(target_os = "l4re"))]
-    let amt = amt.unwrap_or(2 * 1024 * 1024);
-    // L4Re only supports a maximum of 1Mb per default.
-    #[cfg(target_os = "l4re")]
-    let amt = amt.unwrap_or(1024 * 1024);
-
-    // 0 is our sentinel value, so ensure that we'll never see 0 after
-    // initialization has run
-    MIN.store(amt + 1, Ordering::SeqCst);
-    amt
-}
-
 pub fn dumb_print(args: fmt::Arguments) {
     let _ = Stderr::new().map(|mut stderr| stderr.write_fmt(args));
 }