summaryrefslogtreecommitdiff
path: root/coroutine/asyncify/Context.c
diff options
context:
space:
mode:
Diffstat (limited to 'coroutine/asyncify/Context.c')
-rw-r--r--coroutine/asyncify/Context.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/coroutine/asyncify/Context.c b/coroutine/asyncify/Context.c
new file mode 100644
index 0000000000..303e5f4429
--- /dev/null
+++ b/coroutine/asyncify/Context.c
@@ -0,0 +1,10 @@
+#include "Context.h"
+
+void coroutine_trampoline(void * _start, void * _context)
+{
+ coroutine_start start = (coroutine_start)_start;
+ struct coroutine_context * context = _context;
+ rb_wasm_set_stack_pointer(context->current_sp);
+
+ start(context->from, context);
+}