Stop abusing shared memory lock to protect exception (#2509)

Use a separate global lock instead.

Fixes: https://github.com/bytecodealliance/wasm-micro-runtime/issues/2407
This commit is contained in:
YAMAMOTO Takashi
2023-08-31 21:39:08 +09:00
committed by GitHub
parent 53d7027de0
commit 382d52fc05
4 changed files with 75 additions and 76 deletions

View File

@ -668,6 +668,16 @@ void
wasm_propagate_wasi_args(WASMModule *module);
#endif
#if WASM_ENABLE_THREAD_MGR != 0
void
exception_lock(WASMModuleInstance *module_inst);
void
exception_unlock(WASMModuleInstance *module_inst);
#else
#define exception_lock(module_inst) (void)(module_inst)
#define exception_unlock(module_inst) (void)(module_inst)
#endif
#ifdef __cplusplus
}
#endif