Disable aux stack allocations for threads spawned by wasi_thread_start (#1867)

This syscall doesn't need allocating stack or TLS and it's expected from the application
to do that instead. E.g. WASI-libc already does this for `pthread_create`.

Also fix some of the examples to allocate memory for stack and not use stack before
the stack pointer is set to a correct value.
This commit is contained in:
Marcin Kolny
2023-01-09 12:36:34 +00:00
committed by GitHub
parent 2615646c20
commit 0e2382a959
12 changed files with 163 additions and 56 deletions

View File

@ -64,7 +64,7 @@ wasm_exec_env_get_cluster(WASMExecEnv *exec_env);
int32
wasm_cluster_create_thread(WASMExecEnv *exec_env,
wasm_module_inst_t module_inst,
wasm_module_inst_t module_inst, bool alloc_aux_stack,
void *(*thread_routine)(void *), void *arg);
int32