Spread module custom data to all threads, enable libc-builtin float print (#633)
This commit is contained in:
@ -1438,8 +1438,8 @@ wasm_runtime_clear_exception(WASMModuleInstanceCommon *module_inst)
|
||||
}
|
||||
|
||||
void
|
||||
wasm_runtime_set_custom_data(WASMModuleInstanceCommon *module_inst,
|
||||
void *custom_data)
|
||||
wasm_runtime_set_custom_data_internal(WASMModuleInstanceCommon *module_inst,
|
||||
void *custom_data)
|
||||
{
|
||||
#if WASM_ENABLE_INTERP != 0
|
||||
if (module_inst->module_type == Wasm_Module_Bytecode) {
|
||||
@ -1455,6 +1455,17 @@ wasm_runtime_set_custom_data(WASMModuleInstanceCommon *module_inst,
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
wasm_runtime_set_custom_data(WASMModuleInstanceCommon *module_inst,
|
||||
void *custom_data)
|
||||
{
|
||||
#if WASM_ENABLE_THREAD_MGR != 0
|
||||
wasm_cluster_spread_custom_data(module_inst, custom_data);
|
||||
#else
|
||||
wasm_runtime_set_custom_data_internal(module_inst, custom_data);
|
||||
#endif
|
||||
}
|
||||
|
||||
void*
|
||||
wasm_runtime_get_custom_data(WASMModuleInstanceCommon *module_inst)
|
||||
{
|
||||
|
||||
@ -490,6 +490,11 @@ wasm_runtime_get_exception(WASMModuleInstanceCommon *module);
|
||||
WASM_RUNTIME_API_EXTERN void
|
||||
wasm_runtime_clear_exception(WASMModuleInstanceCommon *module_inst);
|
||||
|
||||
/* Internal API */
|
||||
void
|
||||
wasm_runtime_set_custom_data_internal(WASMModuleInstanceCommon *module_inst,
|
||||
void *custom_data);
|
||||
|
||||
/* See wasm_export.h for description */
|
||||
WASM_RUNTIME_API_EXTERN void
|
||||
wasm_runtime_set_custom_data(WASMModuleInstanceCommon *module_inst,
|
||||
|
||||
Reference in New Issue
Block a user