From 67360ae61808453d308496f90e0b3faa3e8efee3 Mon Sep 17 00:00:00 2001 From: Eric Holk Date: Wed, 15 Jun 2011 18:16:17 -0700 Subject: Fixed a problem where spawn arguments were getting lost again. Also, fixed up stack alignment, which closes #496 --- src/rt/rust_task.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/rt/rust_task.cpp') 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); -- cgit 1.4.1-3-g733a5