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

@ -66,7 +66,7 @@ read_leb(const uint8 *buf, const uint8 *buf_end,
}
if (sign && (shift < maxbits) && (byte & 0x40)) {
/* Sign extend */
result |= (uint64)(- (((uint64)1) << shift));
result |= (~((uint64)0)) << shift;
}
*p_result = result;
return true;