about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
authorEric Holk <eholk@mozilla.com>2011-06-15 18:16:17 -0700
committerEric Holk <eholk@mozilla.com>2011-06-15 18:16:59 -0700
commit67360ae61808453d308496f90e0b3faa3e8efee3 (patch)
tree7df5f198272c57aeebf35e9a22aa03cd12f33e0b /src/rt/rust_task.cpp
parentc4f9bd94700188678893659580f3b7aa80da3b7d (diff)
downloadrust-67360ae61808453d308496f90e0b3faa3e8efee3.tar.gz
rust-67360ae61808453d308496f90e0b3faa3e8efee3.zip
Fixed a problem where spawn arguments were getting lost again. Also, fixed up stack alignment, which closes #496
Diffstat (limited to 'src/rt/rust_task.cpp')
-rw-r--r--src/rt/rust_task.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index bae6f221a95..bb8261bb78a 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -17,6 +17,7 @@
 static size_t const min_stk_bytes = 0x300000;
 // static size_t const min_stk_bytes = 0x10000;
 
+
 // Task stack segments. Heap allocated and chained together.
 
 static stk_seg*
@@ -152,25 +153,24 @@ void task_start_wrapper(spawn_args *a)
 
 void
 rust_task::start(uintptr_t spawnee_fn,
-                 uintptr_t args,
-                 size_t callsz)
+                 uintptr_t args)
 {
     LOGPTR(dom, "from spawnee", spawnee_fn);
 
     I(dom, stk->data != NULL);
 
-    char *sp = (char *)stk->limit;
+    char *sp = (char *)rust_sp;
 
     sp -= sizeof(spawn_args);
 
     spawn_args *a = (spawn_args *)sp;
 
     a->task = this;
-    a->a3 = 0xca11ab1e;
+    a->a3 = 0;
     a->a4 = args;
     void **f = (void **)&a->f;
     *f = (void *)spawnee_fn;
-
+    
     ctx.call((void *)task_start_wrapper, a, sp);
 
     yield_timer.reset(0);