From d0594a5ab94070378b082435f700c6d316abfa86 Mon Sep 17 00:00:00 2001 From: Maschell Date: Thu, 30 Jan 2025 17:05:53 +0100 Subject: [PATCH 1/2] Bump version to 0.3.3 --- include/wums/meta.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/wums/meta.h b/include/wums/meta.h index e60e099..118f7da 100644 --- a/include/wums/meta.h +++ b/include/wums/meta.h @@ -39,7 +39,7 @@ extern "C" { #endif -#define WUMS_VERSION "0.3.2" +#define WUMS_VERSION "0.3.3" #define WUMS_MODULE_EXPORT_NAME(__module_name) \ WUMS_META(export_name, __module_name); \ From dfe3be40b7c3b0118916ed3f18ff01e1c305ad2c Mon Sep 17 00:00:00 2001 From: Maschell Date: Thu, 30 Jan 2025 17:06:29 +0100 Subject: [PATCH 2/2] Add hooks which will be called if all start/request exit/end hooks have been called --- include/wums/hooks.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/include/wums/hooks.h b/include/wums/hooks.h index e54d10c..96d9949 100644 --- a/include/wums/hooks.h +++ b/include/wums/hooks.h @@ -59,7 +59,11 @@ typedef enum wums_hook_type_t { WUMS_HOOK_RELOCATIONS_DONE, WUMS_HOOK_APPLICATION_REQUESTS_EXIT, // Introduced in 0.3.2 - WUMS_HOOK_DEINIT + WUMS_HOOK_DEINIT, + // Introduced in 0.3.3 + WUMS_HOOK_ALL_APPLICATION_STARTS_DONE, + WUMS_HOOK_ALL_APPLICATION_ENDS_DONE, + WUMS_HOOK_ALL_APPLICATION_REQUESTS_EXIT_DONE, } wums_hook_type_t; typedef struct wums_hook_t { @@ -105,6 +109,21 @@ typedef struct wums_relocs_done_args_t { WUMS_HOOK_EX(WUMS_HOOK_RELOCATIONS_DONE, __wums_relocations_done); \ void __wums_relocations_done(wums_relocs_done_args_t myargs) +#define WUMS_ALL_APPLICATION_STARTS_DONE() \ + void __wums_all_start_done(void); \ + WUMS_HOOK_EX(WUMS_HOOK_ALL_APPLICATION_STARTS_DONE, __wums_all_start_done); \ + void __wums_all_start_done() + +#define WUMS_ALL_APPLICATION_REQUESTS_EXIT_DONE() \ + void __wums_all_requests_exit_done(void); \ + WUMS_HOOK_EX(WUMS_HOOK_ALL_APPLICATION_REQUESTS_EXIT_DONE, __wums_all_requests_exit_done); \ + void __wums_all_requests_exit_done() + +#define WUMS_ALL_APPLICATION_ENDS_DONE() \ + void __wums_all_ends_done(void); \ + WUMS_HOOK_EX(WUMS_HOOK_ALL_APPLICATION_ENDS_DONE, __wums_all_ends_done); \ + void __wums_all_ends_done() + #ifdef __cplusplus #define __EXTERN_C_MACRO extern "C" #else