about summary refs log tree commit diff
path: root/src/rt
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-01-29 21:26:21 -0800
committerBrian Anderson <banderson@mozilla.com>2012-01-29 21:27:37 -0800
commitfa13fd9d64c3ed60a65e5897467b2d3742aa933f (patch)
treebe018b45197fc9d9dc561d3fd8807a00203540bf /src/rt
parentcad4918b2af71b0d35f263ac168c442f8d266600 (diff)
downloadrust-fa13fd9d64c3ed60a65e5897467b2d3742aa933f.tar.gz
rust-fa13fd9d64c3ed60a65e5897467b2d3742aa933f.zip
rt: Remove set_min_stack
Diffstat (limited to 'src/rt')
-rw-r--r--src/rt/rust_builtin.cpp7
-rw-r--r--src/rt/rust_task.cpp14
-rw-r--r--src/rt/rustrt.def.in1
3 files changed, 1 insertions, 21 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp
index 4bf51da214b..89d8c6d12f2 100644
--- a/src/rt/rust_builtin.cpp
+++ b/src/rt/rust_builtin.cpp
@@ -445,13 +445,6 @@ migrate_alloc(void *alloc, rust_task_id tid) {
     }
 }
 
-// defined in rust_task.cpp
-extern size_t g_custom_min_stack_size;
-extern "C" CDECL void
-set_min_stack(uintptr_t stack_size) {
-    g_custom_min_stack_size = stack_size;
-}
-
 extern "C" CDECL int
 sched_threads() {
     rust_task *task = rust_scheduler::get_task();
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index d6f43ca0794..1bf62e42f01 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -65,18 +65,6 @@ const uint8_t stack_canary[] = {0xAB, 0xCD, 0xAB, 0xCD,
                                 0xAB, 0xCD, 0xAB, 0xCD,
                                 0xAB, 0xCD, 0xAB, 0xCD};
 
-// Stack size
-size_t g_custom_min_stack_size = 0;
-
-static size_t
-get_min_stk_size(size_t default_size) {
-    if (g_custom_min_stack_size != 0) {
-        return g_custom_min_stack_size;
-    } else {
-        return default_size;
-    }
-}
-
 static size_t
 get_next_stk_size(rust_scheduler *sched, rust_task *task,
                   size_t min, size_t current, size_t requested) {
@@ -157,7 +145,7 @@ new_stk(rust_scheduler *sched, rust_task *task, size_t requested_sz)
     }
 
     // The minimum stack size, in bytes, of a Rust stack, excluding red zone
-    size_t min_sz = get_min_stk_size(sched->min_stack_size);
+    size_t min_sz = sched->min_stack_size;
 
     // Try to reuse an existing stack segment
     if (task->stk != NULL && task->stk->prev != NULL) {
diff --git a/src/rt/rustrt.def.in b/src/rt/rustrt.def.in
index 052f4a42779..50981882ecd 100644
--- a/src/rt/rustrt.def.in
+++ b/src/rt/rustrt.def.in
@@ -49,7 +49,6 @@ rust_getcwd
 rust_task_is_unwinding
 rust_task_sleep
 rust_get_task
-set_min_stack
 sched_threads
 shape_log_str
 squareroot