From 9fa44a41e67151c5c392e2bd2b3989d74703efec Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Fri, 18 Nov 2011 15:40:23 -0800 Subject: get pure wrappers approach running --- src/rt/rust_upcall.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/rt/rust_upcall.cpp') diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index c0544383d23..aac4212cac7 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -219,6 +219,16 @@ upcall_alloc_c_stack(size_t nbytes) { return sched->c_context.alloc_stack(nbytes); } +/** + * Allocates |nbytes| bytes in the C stack and returns a pointer to the start + * of the allocated space. + */ +extern "C" CDECL void +upcall_call_shim_on_c_stack(void *args, void *fn_ptr) { + rust_scheduler *sched = rust_scheduler::get_task()->sched; + sched->c_context.call_shim_on_c_stack(args, fn_ptr); +} + extern "C" _Unwind_Reason_Code __gxx_personality_v0(int version, _Unwind_Action actions, -- cgit 1.4.1-3-g733a5