rt: Rename call_shim_on_c_stack to call_and_change_stacks
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user