about summary refs log tree commit diff
path: root/src/rt/rust_upcall.cpp
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2011-11-18 15:40:23 -0800
committerNiko Matsakis <niko@alum.mit.edu>2011-11-18 16:32:19 -0800
commit9fa44a41e67151c5c392e2bd2b3989d74703efec (patch)
treeca51d17b4108c5ea64d997f04d423cbe90fc956b /src/rt/rust_upcall.cpp
parent6072ddad33e034a63bddd1ef577492b2842e8136 (diff)
downloadrust-9fa44a41e67151c5c392e2bd2b3989d74703efec.tar.gz
rust-9fa44a41e67151c5c392e2bd2b3989d74703efec.zip
get pure wrappers approach running
Diffstat (limited to 'src/rt/rust_upcall.cpp')
-rw-r--r--src/rt/rust_upcall.cpp10
1 files changed, 10 insertions, 0 deletions
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,