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:
@ -84,11 +84,24 @@ int os_thread_detach(korp_tid);
|
||||
*/
|
||||
void os_thread_exit(void *retval);
|
||||
|
||||
/**
|
||||
* Initialize current thread environment if current thread
|
||||
* is created by developer but not runtime
|
||||
*
|
||||
* @return 0 if success, -1 otherwise
|
||||
*/
|
||||
int os_thread_env_init();
|
||||
|
||||
/**
|
||||
* Destroy current thread environment
|
||||
*/
|
||||
void os_thread_env_destroy();
|
||||
|
||||
/**
|
||||
* Suspend execution of the calling thread for (at least)
|
||||
* usec microseconds
|
||||
*
|
||||
* @param return 0 if success, -1 otherwise
|
||||
* @return 0 if success, -1 otherwise
|
||||
*/
|
||||
int os_usleep(uint32 usec);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user