enable pthread for AoT && update AOT current version to 2 (#311)

This commit is contained in:
Xu Jun
2020-07-16 20:35:04 +08:00
committed by GitHub
parent ca938f3634
commit 32b2943369
32 changed files with 1549 additions and 584 deletions

View File

@ -489,7 +489,8 @@ pthread_start_routine(void *arg)
if(!wasm_runtime_call_indirect(exec_env,
routine_args->elem_index,
1, argv)) {
wasm_cluster_spread_exception(exec_env);
if (wasm_runtime_get_exception(module_inst))
wasm_cluster_spread_exception(exec_env);
}
/* destroy pthread key values */
@ -673,6 +674,15 @@ pthread_exit_wrapper(wasm_exec_env_t exec_env, int32 retval_offset)
if (!args)
return;
#ifdef OS_ENABLE_HW_BOUND_CHECK
/* If hardware bound check enabled, don't deinstantiate module inst
and thread info node here for AoT module, as they will be freed
in pthread_start_routine */
if (exec_env->jmpbuf_stack_top) {
wasm_cluster_exit_thread(exec_env, (void *)(uintptr_t)retval_offset);
}
#endif
/* destroy pthread key values */
call_key_destructor(exec_env);