Correct typo [ci skip]
[ruby.git] / wasm / machine.h
blob1a60e51d11efe0d94ad3bb6494de3df3fe42a83b
1 #ifndef RB_WASM_SUPPORT_MACHINE_H
2 #define RB_WASM_SUPPORT_MACHINE_H
4 // Function pointer used as scan callbacks
5 typedef void (*rb_wasm_scan_func)(void*, void*);
7 // Scan WebAssembly locals in the all call stack (like registers) spilled by Asyncify
8 // Used by conservative GC
9 void rb_wasm_scan_locals(rb_wasm_scan_func scan);
11 // Get base address of userland C-stack memory space in WebAssembly. Used by conservative GC
12 void *rb_wasm_stack_get_base(void);
15 // Get the current stack pointer
16 void *rb_wasm_get_stack_pointer(void);
18 // Set the current stack pointer
19 void rb_wasm_set_stack_pointer(void *sp);
21 // Returns the Asyncify buffer of next rewinding if unwound for spilling locals.
22 // Used by the top level Asyncify handling in wasm/runtime.c
23 void *rb_wasm_handle_scan_unwind(void);
25 #endif