Implement wasm_runtime_init_thread_env for Windows platform (#683)

Implement wasm_runtime_init_thread_env() for Windows platform by calling os_thread_env_init(): if current thread is created by developer himself but not runtime, developer should call wasm_runtime_init_thread_env() to init the thread environment before calling wasm function, and call wasm_runtime_destroy_thread_env() before thread exits.
And clear compile warnings for Windows platform, fix compile error for AliOS-Things platform

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
Wenyong Huang
2021-08-03 10:49:50 +08:00
committed by GitHub
parent 445722cac3
commit 541f577164
9 changed files with 115 additions and 28 deletions

View File

@ -1324,7 +1324,7 @@ invoke_native_with_hw_bound_check(WASMExecEnv *exec_env, void *func_ptr,
uint16 param_count = func_type->param_count;
uint16 result_count = func_type->result_count;
const uint8 *types = func_type->types;
#if BH_PLATFORM_WINDOWS
#ifdef BH_PLATFORM_WINDOWS
const char *exce;
int result;
#endif