Implement Go language binding (#1196)

Implement Go binding APIs of runtime, module and instance
Add sample, build scripts and update the document

Co-authored-by: venus-taibai <97893654+venus-taibai@users.noreply.github.com>
This commit is contained in:
Wenyong Huang
2022-06-01 11:35:05 +08:00
committed by GitHub
parent 3d34a91f0b
commit 5b1dcf2fa2
25 changed files with 1482 additions and 9 deletions

View File

@ -107,6 +107,12 @@ os_thread_env_init();
void
os_thread_env_destroy();
/**
* Whether the thread environment is initialized
*/
bool
os_thread_env_inited();
/**
* Suspend execution of the calling thread for (at least)
* usec microseconds

View File

@ -360,6 +360,13 @@ os_thread_env_destroy()
}
}
bool
os_thread_env_inited()
{
os_thread_data *thread_data = TlsGetValue(thread_data_key);
return thread_data ? true : false;
}
int
os_sem_init(korp_sem *sem)
{