Refine aot call func procedure and fix zephyr timer overflow issue (#617)

1. Refine the aot call function procedure

2. fix timer integer overflow issue on zephyr platform

3. move wasm_exec_env_set_thread_info into lower layer
This commit is contained in:
Xu Jun
2021-04-19 21:06:56 +08:00
committed by GitHub
parent 03d45f1d62
commit 684d766e2b
14 changed files with 135 additions and 82 deletions

View File

@ -20,6 +20,9 @@ bh_platform_init()
void
bh_platform_destroy()
{
#ifdef OS_ENABLE_HW_BOUND_CHECK
os_thread_destroy_stack_guard_pages();
#endif
}
int os_printf(const char *fmt, ...)

View File

@ -56,6 +56,8 @@ typedef pthread_mutex_t korp_mutex;
typedef pthread_cond_t korp_cond;
typedef pthread_t korp_thread;
#define os_thread_local_attribute __thread
#if WASM_DISABLE_HW_BOUND_CHECK == 0
#if defined(BUILD_TARGET_X86_64) \
|| defined(BUILD_TARGET_AMD_64) \
@ -65,8 +67,6 @@ typedef pthread_t korp_thread;
#define OS_ENABLE_HW_BOUND_CHECK
#define os_thread_local_attribute __thread
typedef jmp_buf korp_jmpbuf;
#define os_setjmp setjmp
@ -75,6 +75,10 @@ typedef jmp_buf korp_jmpbuf;
#define os_getpagesize getpagesize
bool os_thread_init_stack_guard_pages();
void os_thread_destroy_stack_guard_pages();
typedef void (*os_signal_handler)(void *sig_addr);
int os_signal_init(os_signal_handler handler);