re-org platform APIs, simplify porting process (#201)

Co-authored-by: Xu Jun <jun1.xu@intel.com>
This commit is contained in:
Xu Jun
2020-03-16 16:43:57 +08:00
committed by GitHub
parent ef5ceffe71
commit f1a0e75ab7
177 changed files with 2954 additions and 7904 deletions

View File

@ -29,10 +29,8 @@ app_instance_main(wasm_module_inst_t module_inst)
extern "C" {
int bh_printf(const char *message, ...);
typedef void (*bh_print_function_t)(const char* message);
extern void bh_set_print_function(bh_print_function_t pf);
typedef void (*os_print_function_t)(const char* message);
extern void os_set_print_function(os_print_function_t pf);
void enclave_print(const char *message)
{
@ -43,7 +41,7 @@ void enclave_print(const char *message)
void ecall_iwasm_main()
{
bh_set_print_function(enclave_print);
os_set_print_function(enclave_print);
uint8_t *wasm_file_buf = NULL;
int wasm_file_size;