rt: Rename call_shim_on_c_stack to call_and_change_stacks

This commit is contained in:
Brian Anderson
2012-02-08 21:18:23 -08:00
parent 0667fb4e63
commit 1e2fe4ab8f
4 changed files with 5 additions and 5 deletions

View File

@@ -42,7 +42,7 @@ public:
void swap(context &out);
void call(void *f, void *arg, void *sp);
void call_shim_on_c_stack(void *args, void *fn_ptr) {
void call_and_change_stacks(void *args, void *fn_ptr) {
__morestack(args, fn_ptr, regs.esp);
}
};

View File

@@ -41,7 +41,7 @@ public:
void swap(context &out);
void call(void *f, void *arg, void *sp);
void call_shim_on_c_stack(void *args, void *fn_ptr) {
void call_and_change_stacks(void *args, void *fn_ptr) {
__morestack(args, fn_ptr, regs.data[RUSTRT_RSP]);
}
};

View File

@@ -194,7 +194,7 @@ void task_start_wrapper(spawn_args *a)
// The cleanup work needs lots of stack
cleanup_args ca = {a, threw_exception};
task->thread->c_context.call_shim_on_c_stack(&ca, (void*)cleanup_task);
task->thread->c_context.call_and_change_stacks(&ca, (void*)cleanup_task);
task->ctx.next->swap(task->ctx);
}

View File

@@ -48,7 +48,7 @@ call_upcall_on_c_stack(void *args, void *fn_ptr) {
check_stack_alignment();
rust_task *task = rust_task_thread::get_task();
rust_task_thread *thread = task->thread;
thread->c_context.call_shim_on_c_stack(args, fn_ptr);
thread->c_context.call_and_change_stacks(args, fn_ptr);
}
extern "C" void record_sp(void *limit);
@@ -71,7 +71,7 @@ upcall_call_shim_on_c_stack(void *args, void *fn_ptr) {
rust_task_thread *thread = task->thread;
try {
thread->c_context.call_shim_on_c_stack(args, fn_ptr);
thread->c_context.call_and_change_stacks(args, fn_ptr);
} catch (...) {
A(thread, false, "Native code threw an exception");
}