diff --git a/include/wums/hooks.h b/include/wums/hooks.h index 0179b0e..77a1ef0 100644 --- a/include/wums/hooks.h +++ b/include/wums/hooks.h @@ -58,6 +58,8 @@ typedef enum wums_hook_type_t { WUMS_HOOK_APPLICATION_ENDS, WUMS_HOOK_RELOCATIONS_DONE, WUMS_HOOK_APPLICATION_REQUESTS_EXIT, + // Introduced in 0.3.2 + WUMS_HOOK_DEINIT } wums_hook_type_t; typedef struct wums_hook_t { @@ -78,6 +80,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() \ + 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); \