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 swap(context &out);
|
||||||
void call(void *f, void *arg, void *sp);
|
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);
|
__morestack(args, fn_ptr, regs.esp);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public:
|
|||||||
void swap(context &out);
|
void swap(context &out);
|
||||||
void call(void *f, void *arg, void *sp);
|
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]);
|
__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
|
// The cleanup work needs lots of stack
|
||||||
cleanup_args ca = {a, threw_exception};
|
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);
|
task->ctx.next->swap(task->ctx);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ call_upcall_on_c_stack(void *args, void *fn_ptr) {
|
|||||||
check_stack_alignment();
|
check_stack_alignment();
|
||||||
rust_task *task = rust_task_thread::get_task();
|
rust_task *task = rust_task_thread::get_task();
|
||||||
rust_task_thread *thread = task->thread;
|
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);
|
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;
|
rust_task_thread *thread = task->thread;
|
||||||
try {
|
try {
|
||||||
thread->c_context.call_shim_on_c_stack(args, fn_ptr);
|
thread->c_context.call_and_change_stacks(args, fn_ptr);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
A(thread, false, "Native code threw an exception");
|
A(thread, false, "Native code threw an exception");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user