Enable shared memory && add pthread support (#282)

This commit is contained in:
Xu Jun
2020-06-15 19:04:04 +08:00
committed by GitHub
parent f4d4d69736
commit d98ab63e5c
41 changed files with 3081 additions and 289 deletions

View File

@ -319,7 +319,7 @@ wasm_runtime_lookup_wasi_start_function(wasm_module_inst_t module_inst);
* @param name the name of the function
* @param signature the signature of the function, ignored currently
*
* @return the function instance found. Otherwise NULL will be returned.
* @return the function instance found, NULL if not found
*/
wasm_function_inst_t
wasm_runtime_lookup_function(wasm_module_inst_t const module_inst,
@ -331,7 +331,8 @@ wasm_runtime_lookup_function(wasm_module_inst_t const module_inst,
* @param module_inst the module instance
* @param stack_size the stack size to execute a WASM function
*
* @return the execution environment. In case of invalid stack size, NULL will be returned.
* @return the execution environment, NULL if failed, e.g. invalid
* stack size is passed
*/
wasm_exec_env_t
wasm_runtime_create_exec_env(wasm_module_inst_t module_inst,
@ -386,7 +387,7 @@ wasm_runtime_call_wasm(wasm_exec_env_t exec_env,
* @param argv the arguments array
*
* @return true if the main function is called, false otherwise and exception
* will be thrown, the caller can call wasm_runtime_get_exception to get
* will be thrown, the caller can call wasm_runtime_get_exception to get
* the exception info.
*/
bool
@ -679,6 +680,16 @@ wasm_runtime_set_user_data(wasm_exec_env_t exec_env,
void *
wasm_runtime_get_user_data(wasm_exec_env_t exec_env);
#if WASM_ENABLE_THREAD_MGR != 0
/**
* Set the max thread num per cluster.
*
* @param num maximum thread num
*/
void
wasm_runtime_set_max_thread_num(uint32_t num);
#endif
#ifdef __cplusplus
}
#endif