From acb68c64c2603515926baeb90cd7c9daa9cfec61 Mon Sep 17 00:00:00 2001 From: Xu Jun <693788454@qq.com> Date: Tue, 16 Jun 2020 15:01:35 +0800 Subject: [PATCH] update doc for multi-thread (#284) --- README.md | 1 + core/iwasm/common/wasm_runtime_common.c | 8 ++++++++ core/iwasm/common/wasm_shared_memory.c | 3 +++ core/iwasm/libraries/libc-builtin/libc_builtin_wrapper.c | 2 -- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e2276b95..41e028b1 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ iwasm VM core - [Embeddable with the supporting C API's](./doc/embed_wamr.md) - [The mechanism for exporting native API's to WASM applications](./doc/export_native_api.md) - [Multiple modules as dependencies](./doc/multi_module.md) +- [Thread management and pthread library](./doc/pthread_library.md) ### post-MVP features - [Non-trapping float-to-int conversions](https://github.com/WebAssembly/nontrapping-float-to-int-conversions) diff --git a/core/iwasm/common/wasm_runtime_common.c b/core/iwasm/common/wasm_runtime_common.c index 50b459bf..986348aa 100644 --- a/core/iwasm/common/wasm_runtime_common.c +++ b/core/iwasm/common/wasm_runtime_common.c @@ -542,6 +542,10 @@ wasm_exec_env_set_aux_stack(WASMExecEnv *exec_env, if (module_inst->module_type == Wasm_Module_Bytecode) { return wasm_set_aux_stack(exec_env, start_offset, size); } +#endif +#if WASM_ENABLE_AOT != 0 + /* TODO: implement set aux stack in AoT mode */ + (void)module_inst; #endif return false; } @@ -556,6 +560,10 @@ wasm_exec_env_get_aux_stack(WASMExecEnv *exec_env, if (module_inst->module_type == Wasm_Module_Bytecode) { return wasm_get_aux_stack(exec_env, start_offset, size); } +#endif +#if WASM_ENABLE_AOT != 0 + /* TODO: implement get aux stack in AoT mode */ + (void)module_inst; #endif return false; } diff --git a/core/iwasm/common/wasm_shared_memory.c b/core/iwasm/common/wasm_shared_memory.c index 5fbfe50f..38baee9c 100644 --- a/core/iwasm/common/wasm_shared_memory.c +++ b/core/iwasm/common/wasm_shared_memory.c @@ -88,6 +88,7 @@ shared_memory_dec_reference(WASMModuleCommon *module) return -1; } +#if WASM_ENABLE_INTERP != 0 WASMMemoryInstance* shared_memory_get_memory_inst(WASMSharedMemNode *node) { @@ -121,4 +122,6 @@ shared_memory_set_memory_inst(WASMModuleCommon *module, return node; } +#endif /* end of WASM_ENABLE_INTERP */ + #endif /* end of WASM_ENABLE_SHARED_MEMORY */ diff --git a/core/iwasm/libraries/libc-builtin/libc_builtin_wrapper.c b/core/iwasm/libraries/libc-builtin/libc_builtin_wrapper.c index 006e5519..88ebc013 100644 --- a/core/iwasm/libraries/libc-builtin/libc_builtin_wrapper.c +++ b/core/iwasm/libraries/libc-builtin/libc_builtin_wrapper.c @@ -1131,11 +1131,9 @@ typedef struct WASMNativeGlobalDef { } WASMNativeGlobalDef; static WASMNativeGlobalDef native_global_defs[] = { -#if WASM_ENABLE_SPEC_TEST != 0 { "spectest", "global_i32", .global_data.i32 = 666 }, { "spectest", "global_f32", .global_data.f32 = 666.6 }, { "spectest", "global_f64", .global_data.f64 = 666.6 }, -#endif { "test", "global-i32", .global_data.i32 = 0 }, { "test", "global-f32", .global_data.f32 = 0 }, { "env", "STACKTOP", .global_data.u32 = 0 },