diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2011-11-18 15:40:23 -0800 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2011-11-18 16:32:19 -0800 |
| commit | 9fa44a41e67151c5c392e2bd2b3989d74703efec (patch) | |
| tree | ca51d17b4108c5ea64d997f04d423cbe90fc956b /src/rt/rust_upcall.cpp | |
| parent | 6072ddad33e034a63bddd1ef577492b2842e8136 (diff) | |
| download | rust-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.cpp | 10 |
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, |
