Add WUMS_DEINITIALIZE hook

This commit is contained in:
Maschell 2023-01-06 15:27:52 +01:00
parent 09908b8a55
commit b855534a68

View File

@ -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); \