Enhance wasm loader and interpreter, enhance code security and update document (#149)
This commit is contained in:
@ -59,12 +59,15 @@
|
||||
#define WASM_ENABLE_LOG 1
|
||||
#endif
|
||||
|
||||
#if defined(BUILD_TARGET_X86_32) || defined(BUILD_TARGET_X86_64)
|
||||
#define WASM_CPU_SUPPORTS_UNALIGNED_64BIT_ACCESS 1
|
||||
#else
|
||||
#define WASM_CPU_SUPPORTS_UNALIGNED_64BIT_ACCESS 0
|
||||
#endif
|
||||
|
||||
/* WASM Interpreter labels-as-values feature */
|
||||
#define WASM_ENABLE_LABELS_AS_VALUES 1
|
||||
|
||||
/* WASM Branch Block address hashmap */
|
||||
#define WASM_ENABLE_HASH_BLOCK_ADDR 0
|
||||
|
||||
/* Heap and stack profiling */
|
||||
#define BEIHAI_ENABLE_MEMORY_PROFILING 0
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#include <autoconf.h>
|
||||
#include <zephyr.h>
|
||||
#include <kernel.h>
|
||||
#include <misc/printk.h>
|
||||
#include <sys/printk.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdarg.h>
|
||||
#include <ctype.h>
|
||||
|
||||
@ -426,26 +426,3 @@ void cleanup_app_timers(timer_ctx_t ctx)
|
||||
vm_mutex_unlock(&ctx->mutex);
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* One reference implementation for timer manager
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
void * thread_timer_check(void * arg)
|
||||
{
|
||||
timer_ctx_t ctx = (timer_ctx_t) arg;
|
||||
while (1) {
|
||||
int ms_to_expiry = check_app_timers(ctx);
|
||||
vm_mutex_lock(&ctx->mutex);
|
||||
vm_cond_reltimedwait(&ctx->cond, &ctx->mutex, ms_to_expiry);
|
||||
vm_mutex_unlock(&ctx->mutex);
|
||||
}
|
||||
}
|
||||
|
||||
void wakeup_timer_thread(timer_ctx_t ctx)
|
||||
{
|
||||
vm_cond_signal(&ctx->cond);
|
||||
}
|
||||
|
||||
|
||||
@ -33,9 +33,6 @@ void cleanup_app_timers(timer_ctx_t ctx);
|
||||
int check_app_timers(timer_ctx_t ctx);
|
||||
int get_expiry_ms(timer_ctx_t ctx);
|
||||
|
||||
void wakeup_timer_thread(timer_ctx_t ctx);
|
||||
void * thread_timer_check(void * arg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user