Skip to content

Commit 2983e77

Browse files
committed
rt: Remove unused context functions
1 parent b778dac commit 2983e77

File tree

2 files changed

+0
-28
lines changed

2 files changed

+0
-28
lines changed

src/rt/arch/i386/context.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,6 @@ class context {
4141

4242
void swap(context &out);
4343
void call(void *f, void *arg, void *sp);
44-
void call(void *f, void *sp);
45-
46-
// Note that this doesn't actually adjust esp. Instead, we adjust esp when
47-
// we actually do the call. This is needed for exception safety -- if the
48-
// function being called causes the task to fail, then we have to avoid
49-
// leaking space on the C stack.
50-
inline void *alloc_stack(size_t nbytes) {
51-
uint32_t bot = regs.esp;
52-
uint32_t top = align_down(bot - nbytes);
53-
54-
(void)VALGRIND_MAKE_MEM_UNDEFINED(top - 4, bot - top + 4);
55-
56-
return reinterpret_cast<void *>(top);
57-
}
5844

5945
void call_shim_on_c_stack(void *args, void *fn_ptr) {
6046
__morestack(args, fn_ptr, regs.esp);

src/rt/arch/x86_64/context.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,6 @@ class context {
4040

4141
void swap(context &out);
4242
void call(void *f, void *arg, void *sp);
43-
void call(void *f, void *sp);
44-
45-
// Note that this doesn't actually adjust esp. Instead, we adjust esp when
46-
// we actually do the call. This is needed for exception safety -- if the
47-
// function being called causes the task to fail, then we have to avoid
48-
// leaking space on the C stack.
49-
inline void *alloc_stack(size_t nbytes) {
50-
uint64_t bot = regs.data[RUSTRT_RSP];
51-
uint64_t top = align_down(bot - nbytes);
52-
53-
(void)VALGRIND_MAKE_MEM_UNDEFINED(top - 4, bot - top + 4);
54-
55-
return reinterpret_cast<void *>(top);
56-
}
5743

5844
void call_shim_on_c_stack(void *args, void *fn_ptr) {
5945
__morestack(args, fn_ptr, regs.data[RUSTRT_RSP]);

0 commit comments

Comments
 (0)