about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-11-28 16:25:45 -0800
committerBrian Anderson <banderson@mozilla.com>2011-11-28 16:29:52 -0800
commitcd75c9ce11672f360c6e430e824823a4d265c85b (patch)
treef7298c22252ffa0218e5ea2de6ccf438a18eb326 /src/rt/rust_task.cpp
parent92f1e9f1ab347087f4005c2e2fa5a2d805e1d888 (diff)
downloadrust-cd75c9ce11672f360c6e430e824823a4d265c85b.tar.gz
rust-cd75c9ce11672f360c6e430e824823a4d265c85b.zip
rt: Implement part of the 64-bit __morestack
Diffstat (limited to 'src/rt/rust_task.cpp')
-rw-r--r--src/rt/rust_task.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index 30489b1d669..3933692f015 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -86,6 +86,21 @@ rust_new_stack(size_t stk_sz, void *args_addr, size_t args_sz,
     return new_sp;
 }
 
+struct rust_new_stack2_args {
+  size_t stk_sz;
+  void *args_addr;
+  size_t args_sz;
+  uintptr_t current_sp;
+};
+
+// A new stack function suitable for calling through
+// upcall_call_shim_on_c_stack
+extern "C" void *
+rust_new_stack2(struct rust_new_stack2_args *args) {
+    return rust_new_stack(args->stk_sz, args->args_addr,
+                          args->args_sz, args->current_sp);
+}
+
 extern "C" void
 rust_del_stack() {
     rust_task *task = rust_scheduler::get_task();