From ae7b0ac3900718b342c33a1ffdd8b29069ae4f78 Mon Sep 17 00:00:00 2001 From: Ben Blum Date: Thu, 28 Jun 2012 14:53:21 -0400 Subject: move reset_stack_limit off C stack (closes #2679) --- src/rt/rust_task.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'src/rt/rust_task.cpp') diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index c899d997197..a6ad35b5a57 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -615,13 +615,6 @@ struct reset_args { void reset_stack_limit_on_c_stack(reset_args *args) { - rust_task *task = args->task; - uintptr_t sp = args->sp; - while (!sp_in_stk_seg(sp, task->stk)) { - task->stk = task->stk->prev; - assert(task->stk != NULL && "Failed to find the current stack"); - } - task->record_stack_limit(); } /* @@ -632,12 +625,11 @@ when unwinding through __morestack). void rust_task::reset_stack_limit() { uintptr_t sp = get_sp(); - // Have to do the rest on the C stack because it involves - // freeing stack segments, logging, etc. - // FIXME (#2679): This probably doesn't need to happen on the C - // stack now - reset_args ra = {this, sp}; - call_on_c_stack(&ra, (void*)reset_stack_limit_on_c_stack); + while (!sp_in_stk_seg(sp, stk)) { + stk = stk->prev; + assert(stk != NULL && "Failed to find the current stack"); + } + record_stack_limit(); } void -- cgit 1.4.1-3-g733a5