rt: Remove unused context functions
This commit is contained in:
parent
b778dac197
commit
2983e77383
2 changed files with 0 additions and 28 deletions
|
|
@ -41,20 +41,6 @@ public:
|
|||
|
||||
void swap(context &out);
|
||||
void call(void *f, void *arg, void *sp);
|
||||
void call(void *f, void *sp);
|
||||
|
||||
// Note that this doesn't actually adjust esp. Instead, we adjust esp when
|
||||
// we actually do the call. This is needed for exception safety -- if the
|
||||
// function being called causes the task to fail, then we have to avoid
|
||||
// leaking space on the C stack.
|
||||
inline void *alloc_stack(size_t nbytes) {
|
||||
uint32_t bot = regs.esp;
|
||||
uint32_t top = align_down(bot - nbytes);
|
||||
|
||||
(void)VALGRIND_MAKE_MEM_UNDEFINED(top - 4, bot - top + 4);
|
||||
|
||||
return reinterpret_cast<void *>(top);
|
||||
}
|
||||
|
||||
void call_shim_on_c_stack(void *args, void *fn_ptr) {
|
||||
__morestack(args, fn_ptr, regs.esp);
|
||||
|
|
|
|||
|
|
@ -40,20 +40,6 @@ public:
|
|||
|
||||
void swap(context &out);
|
||||
void call(void *f, void *arg, void *sp);
|
||||
void call(void *f, void *sp);
|
||||
|
||||
// Note that this doesn't actually adjust esp. Instead, we adjust esp when
|
||||
// we actually do the call. This is needed for exception safety -- if the
|
||||
// function being called causes the task to fail, then we have to avoid
|
||||
// leaking space on the C stack.
|
||||
inline void *alloc_stack(size_t nbytes) {
|
||||
uint64_t bot = regs.data[RUSTRT_RSP];
|
||||
uint64_t top = align_down(bot - nbytes);
|
||||
|
||||
(void)VALGRIND_MAKE_MEM_UNDEFINED(top - 4, bot - top + 4);
|
||||
|
||||
return reinterpret_cast<void *>(top);
|
||||
}
|
||||
|
||||
void call_shim_on_c_stack(void *args, void *fn_ptr) {
|
||||
__morestack(args, fn_ptr, regs.data[RUSTRT_RSP]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue