diff --git a/include/wums/defines/module_defines.h b/include/wums/defines/module_defines.h index 2ebd6d3..177fa85 100644 --- a/include/wums/defines/module_defines.h +++ b/include/wums/defines/module_defines.h @@ -60,7 +60,8 @@ typedef struct module_information_single_t { uint32_t number_function_symbols; } module_information_single_t; -#define MODULE_INFORMATION_VERSION 0x0000000E +#define MODULE_INFORMATION_VERSION 0x0000000E +#define MODULE_LITE_INFORMATION_VERSION 0x80000001 typedef struct module_information_t { uint32_t version; @@ -69,6 +70,11 @@ typedef struct module_information_t { uint32_t number_acquired_rpls; uint32_t * acquired_rpls; } module_information_t; + +typedef struct module_lite_information_t { + uint32_t version; +} module_lite_information_t; + // clang-format on #ifdef __cplusplus diff --git a/include/wums/hooks.h b/include/wums/hooks.h index 0179b0e..a7e01c1 100644 --- a/include/wums/hooks.h +++ b/include/wums/hooks.h @@ -58,6 +58,7 @@ typedef enum wums_hook_type_t { WUMS_HOOK_APPLICATION_ENDS, WUMS_HOOK_RELOCATIONS_DONE, WUMS_HOOK_APPLICATION_REQUESTS_EXIT, + WUMS_HOOK_DEINIT, } wums_hook_type_t; typedef struct wums_hook_t { @@ -78,6 +79,11 @@ typedef struct wums_relocs_done_args_t { WUMS_HOOK_EX(WUMS_HOOK_INIT, __wums__init); \ void __wums__init(wums_app_init_args_t myargs) +#define WUMS_DEINITIALIZE(myargs) \ + void __wums__deinit(); \ + WUMS_HOOK_EX(WUMS_HOOK_DEINIT, __wums__deinit); \ + void __wums__deinit() + #define WUMS_APPLICATION_STARTS() \ void __wums_start(void); \ WUMS_HOOK_EX(WUMS_HOOK_APPLICATION_STARTS, __wums_start); \ diff --git a/include/wums/meta.h b/include/wums/meta.h index ca46fdc..ddf7cdb 100644 --- a/include/wums/meta.h +++ b/include/wums/meta.h @@ -39,9 +39,9 @@ extern "C" { #endif -#define WUMS_MODULE_EXPORT_NAME(x) \ +#define WUMS_MODULE_EXPORT_NAME_EX(x, version) \ WUMS_META(export_name, x); \ - WUMS_META(wum, "0.3.1"); \ + WUMS_META(wum, version); \ WUMS_USE_WUT_MALLOC(); \ WUMS_USE_WUT_SOCKETS(); \ WUMS_USE_WUT_NEWLIB(); \ @@ -56,6 +56,17 @@ extern "C" { } \ WUMS_META(buildtimestamp, __DATE__ " " __TIME__) +#define WUMS_LITE_MODULE_EXPORT_NAME(x) \ + WUMS_MODULE_EXPORT_NAME_EX(x, "lite-0.1.0"); + +#define WUMS_MODULE_EXPORT_NAME(x) \ + WUMS_MODULE_EXPORT_NAME_EX(x, "0.3.1"); + +#define WUMS_LITE_MODULE_AUTHOR(x) WUMS_META(author, x) +#define WUMS_LITE_MODULE_VERSION(x) WUMS_META(version, x) +#define WUMS_LITE_MODULE_LICENSE(x) WUMS_META(license, x) +#define WUMS_LITE_MODULE_DESCRIPTION(x) WUMS_META(description, x) + #define WUMS_MODULE_AUTHOR(x) WUMS_META(author, x) #define WUMS_MODULE_VERSION(x) WUMS_META(version, x) #define WUMS_MODULE_LICENSE(x) WUMS_META(license, x)