mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
rt: Remove unused context functions
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user