From 50c46ae8e9472546d1dcd3fe16a41bbebab4cf82 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Mon, 6 Jul 2020 09:51:31 -0400 Subject: [PATCH] docs: better comment wasm init funcs --- runtime/include/types.h | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/runtime/include/types.h b/runtime/include/types.h index a16d21b..bee52ca 100644 --- a/runtime/include/types.h +++ b/runtime/include/types.h @@ -125,17 +125,20 @@ typedef void (*mod_libc_fn_t)(i32, i32); #define LISTENER_THREAD_MAX_EPOLL_EVENTS 1024 #define MODULE_DEFAULT_REQUEST_RESPONSE_SIZE (PAGE_SIZE) -#define MODULE_INITIALIZE_GLOBALS "populate_globals" /* From Silverfish */ -#define MODULE_INITIALIZE_MEMORY "populate_memory" /* From Silverfish */ -#define MODULE_INITIALIZE_TABLE "populate_table" /* From Silverfish */ -#define MODULE_INITIALIZE_LIBC "wasmf___init_libc" /* From Silverfish */ -#define MODULE_MAIN "wasmf_main" /* From Silverfish */ -#define MODULE_MAX_ARGUMENT_COUNT 16 /* Max number of arguments */ -#define MODULE_MAX_ARGUMENT_SIZE 64 /* Max size of a single argument */ -#define MODULE_MAX_MODULE_COUNT 128 /* Max number of modules */ -#define MODULE_MAX_NAME_LENGTH 32 /* Max module name length */ -#define MODULE_MAX_PATH_LENGTH 256 /* Max length of path string */ -#define MODULE_MAX_PENDING_CLIENT_REQUESTS 1000 + +/* Wasm initialization functions generated by the compiler */ +#define MODULE_INITIALIZE_GLOBALS "populate_globals" +#define MODULE_INITIALIZE_MEMORY "populate_memory" +#define MODULE_INITIALIZE_TABLE "populate_table" +#define MODULE_INITIALIZE_LIBC "wasmf___init_libc" +#define MODULE_MAIN "wasmf_main" + +#define MODULE_MAX_ARGUMENT_COUNT 16 /* Max number of arguments */ +#define MODULE_MAX_ARGUMENT_SIZE 64 /* Max size of a single argument */ +#define MODULE_MAX_MODULE_COUNT 128 /* Max number of modules */ +#define MODULE_MAX_NAME_LENGTH 32 /* Max module name length */ +#define MODULE_MAX_PATH_LENGTH 256 /* Max length of path string */ +#define MODULE_MAX_PENDING_CLIENT_REQUESTS 1000 #define RUNTIME_LOG_FILE "awesome.log" #define RUNTIME_READ_WRITE_VECTOR_LENGTH 16