From 2983e77383edd852bb30a022e4599e7c42670ac5 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 8 Feb 2012 15:12:28 -0800 Subject: [PATCH] rt: Remove unused context functions --- src/rt/arch/i386/context.h | 14 -------------- src/rt/arch/x86_64/context.h | 14 -------------- 2 files changed, 28 deletions(-) diff --git a/src/rt/arch/i386/context.h b/src/rt/arch/i386/context.h index 516632fe38fa..9d5d0f6d4ee8 100644 --- a/src/rt/arch/i386/context.h +++ b/src/rt/arch/i386/context.h @@ -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(top); - } void call_shim_on_c_stack(void *args, void *fn_ptr) { __morestack(args, fn_ptr, regs.esp); diff --git a/src/rt/arch/x86_64/context.h b/src/rt/arch/x86_64/context.h index bb35486dbc18..651c3e93d02e 100644 --- a/src/rt/arch/x86_64/context.h +++ b/src/rt/arch/x86_64/context.h @@ -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(top); - } void call_shim_on_c_stack(void *args, void *fn_ptr) { __morestack(args, fn_ptr, regs.data[RUSTRT_RSP]);