summary refs log tree commit diff
path: root/src/rt/rust_builtin.cpp
diff options
context:
space:
mode:
authorEric Holk <eholk@mozilla.com>2011-07-25 15:02:43 -0700
committerEric Holk <eholk@mozilla.com>2011-07-28 10:47:28 -0700
commite697a52359874c2b7387be96e664b1f94b14255b (patch)
treefd26091e3372bb53af9fc5bdf4e7bd413a3ade82 /src/rt/rust_builtin.cpp
parent117e251733975e026bdc57f4bdaecf9253d3b575 (diff)
downloadrust-e697a52359874c2b7387be96e664b1f94b14255b.tar.gz
rust-e697a52359874c2b7387be96e664b1f94b14255b.zip
Adding a function to stdlib to set the min stack size, for programs
that absolutely will not succeed with a large default stack. This
should be removed once we have stack grown working.

Also updated word-count to succeed under the new test framework.
Diffstat (limited to 'src/rt/rust_builtin.cpp')
-rw-r--r--src/rt/rust_builtin.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp
index eefc6dac8ce..4870c9fe545 100644
--- a/src/rt/rust_builtin.cpp
+++ b/src/rt/rust_builtin.cpp
@@ -856,6 +856,13 @@ clone_chan(rust_task *task, rust_chan *chan) {
     return chan->clone(task);
 }
 
+// defined in rust_task.cpp
+extern size_t g_min_stack_size;
+extern "C" CDECL void
+set_min_stack(rust_task *task, uintptr_t stack_size) {
+    g_min_stack_size = stack_size;
+}
+
 //
 // Local Variables:
 // mode: C++