libcore: Add sys::set_min_stack

Adding this back to the library as a stopgap measure to recover some benchmark
performance. See #1527.
This commit is contained in:
Brian Anderson 2012-01-14 19:21:23 -08:00
parent b93ed36555
commit bc77d7bdb0

View File

@ -21,6 +21,7 @@ native mod rustrt {
fn unsupervise();
fn shape_log_str<T>(t: *sys::type_desc, data: T) -> str;
fn rust_set_exit_status(code: int);
fn set_min_stack(size: uint);
}
#[abi = "rust-intrinsic"]
@ -105,6 +106,22 @@ fn set_exit_status(code: int) {
rustrt::rust_set_exit_status(code);
}
// FIXME: #1495 - This shouldn't exist
#[doc(
brief =
"Globally set the minimum size, in bytes, of a stack segment",
desc =
"Rust tasks have segmented stacks that are connected in a linked list \
allowing them to start very small and grow very large. In some \
situations this can result in poor performance. Calling this function \
will set the minimum size of all stack segments allocated in the \
future, for all tasks."
)]
#[deprecated]
fn set_min_stack(size: uint) {
rustrt::set_min_stack(size);
}
// Local Variables:
// mode: rust;
// fill-column: 78;