Skip to content

Commit 1e2fe4a

Browse files
committed
rt: Rename call_shim_on_c_stack to call_and_change_stacks
1 parent 0667fb4 commit 1e2fe4a

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/rt/arch/i386/context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class context {
4242
void swap(context &out);
4343
void call(void *f, void *arg, void *sp);
4444

45-
void call_shim_on_c_stack(void *args, void *fn_ptr) {
45+
void call_and_change_stacks(void *args, void *fn_ptr) {
4646
__morestack(args, fn_ptr, regs.esp);
4747
}
4848
};

src/rt/arch/x86_64/context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class context {
4141
void swap(context &out);
4242
void call(void *f, void *arg, void *sp);
4343

44-
void call_shim_on_c_stack(void *args, void *fn_ptr) {
44+
void call_and_change_stacks(void *args, void *fn_ptr) {
4545
__morestack(args, fn_ptr, regs.data[RUSTRT_RSP]);
4646
}
4747
};

src/rt/rust_task.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ void task_start_wrapper(spawn_args *a)
194194

195195
// The cleanup work needs lots of stack
196196
cleanup_args ca = {a, threw_exception};
197-
task->thread->c_context.call_shim_on_c_stack(&ca, (void*)cleanup_task);
197+
task->thread->c_context.call_and_change_stacks(&ca, (void*)cleanup_task);
198198

199199
task->ctx.next->swap(task->ctx);
200200
}

src/rt/rust_upcall.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ call_upcall_on_c_stack(void *args, void *fn_ptr) {
4848
check_stack_alignment();
4949
rust_task *task = rust_task_thread::get_task();
5050
rust_task_thread *thread = task->thread;
51-
thread->c_context.call_shim_on_c_stack(args, fn_ptr);
51+
thread->c_context.call_and_change_stacks(args, fn_ptr);
5252
}
5353

5454
extern "C" void record_sp(void *limit);
@@ -71,7 +71,7 @@ upcall_call_shim_on_c_stack(void *args, void *fn_ptr) {
7171

7272
rust_task_thread *thread = task->thread;
7373
try {
74-
thread->c_context.call_shim_on_c_stack(args, fn_ptr);
74+
thread->c_context.call_and_change_stacks(args, fn_ptr);
7575
} catch (...) {
7676
A(thread, false, "Native code threw an exception");
7777
}

0 commit comments

Comments
 (0)