Enhance wasm loader and interpreter, enhance code security and update document (#149)

This commit is contained in:
wenyongh
2019-12-13 15:30:30 +08:00
committed by GitHub
parent 1c81ad6da5
commit 631b7a2403
45 changed files with 678 additions and 646 deletions

View File

@ -32,6 +32,7 @@
#include "attr_container.h"
#include "module_wasm_app.h"
#include "wasm_export.h"
#include "wgl.h"
#include "lv_drivers/display/monitor.h"
#include "lv_drivers/indev/mouse.h"
@ -47,11 +48,11 @@ static char *uart_device = "/dev/ttyS2";
static int baudrate = B115200;
#endif
extern void * thread_timer_check(void *);
extern void init_sensor_framework();
extern void exit_sensor_framework();
extern void exit_connection_framework();
extern int aee_host_msg_callback(void *msg, uint16_t msg_len);
extern bool init_connection_framework();
extern void wgl_init();
#ifndef CONNECTION_UART
int listenfd = -1;
@ -504,9 +505,15 @@ int iwasm_main(int argc, char *argv[])
vm_thread_create(&tid, func_uart_mode, NULL, BH_APPLET_PRESERVED_STACK_SIZE);
#endif
// TODO:
app_manager_startup(&interface);
fail1: bh_memory_destroy();
exit_wasm_timer();
exit_sensor_framework();
wgl_exit();
exit_connection_framework();
fail1:
bh_memory_destroy();
return -1;
}

View File

@ -2,8 +2,8 @@
* Copyright (C) 2019 Intel Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/
extern void iwasm_main(int argc, char *argv[]);
extern int iwasm_main(int argc, char *argv[]);
int main(int argc, char *argv[])
{
iwasm_main(argc,argv);
return iwasm_main(argc,argv);
}