From ed5170f03226ba2f4015ce16c7f32614b0ecdb77 Mon Sep 17 00:00:00 2001 From: Maschell Date: Tue, 20 Jan 2026 17:09:59 +0100 Subject: [PATCH] Add support for upcoming wut version --- Makefile | 2 +- include/wums/hooks.h | 23 ++++++++++------------- include/wums/meta.h | 4 ++-- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 8a15c8e..8a1dbc8 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ include $(TOPDIR)/share/wums_rules export WUMS_MAJOR := 0 export WUMS_MINOR := 3 -export WUMS_PATCH := 2 +export WUMS_PATCH := 5 VERSION := $(WUMS_MAJOR).$(WUMS_MINOR).$(WUMS_PATCH) diff --git a/include/wums/hooks.h b/include/wums/hooks.h index 1931a0c..b3c84ac 100644 --- a/include/wums/hooks.h +++ b/include/wums/hooks.h @@ -65,8 +65,10 @@ typedef enum wums_hook_type_t { WUMS_HOOK_ALL_APPLICATION_ENDS_DONE, WUMS_HOOK_ALL_APPLICATION_REQUESTS_EXIT_DONE, // Introduced in 0.3.4 - WUMS_HOOK_GET_CUSTOM_RPL_ALLOCATOR, // for internal usage only - WUMS_HOOK_CLEAR_ALLOCATED_RPL_MEMORY // for internal usage only + WUMS_HOOK_GET_CUSTOM_RPL_ALLOCATOR, // for internal usage only + WUMS_HOOK_CLEAR_ALLOCATED_RPL_MEMORY, // for internal usage only + // Introduced in 0.3.5 + WUMS_HOOK_INIT_WUT_THREAD // for internal usage only } wums_hook_type_t; typedef uint32_t (*WUMSRPLAllocatorAllocFn)(int32_t size, int32_t align, void **outAddr); @@ -187,17 +189,12 @@ typedef struct wums_relocs_done_args_t { } \ WUMS_HOOK_EX(WUMS_HOOK_FINI_WUT_NEWLIB, on_fini_wut_newlib) -#define WUMS_USE_WUT_STDCPP() \ - __EXTERN_C_MACRO void __init_wut_stdcpp(); \ - void on_init_wut_stdcpp() { \ - __init_wut_stdcpp(); \ - } \ - WUMS_HOOK_EX(WUMS_HOOK_INIT_WUT_STDCPP, on_init_wut_stdcpp); \ - __EXTERN_C_MACRO void __fini_wut_stdcpp(); \ - void on_fini_wut_stdcpp() { \ - __fini_wut_stdcpp(); \ - } \ - WUMS_HOOK_EX(WUMS_HOOK_FINI_WUT_STDCPP, on_fini_wut_stdcpp) +#define WUMS_USE_WUT_THREAD() \ + __EXTERN_C_MACRO void __init_wut_thread(); \ + void on_init_wut_thread() { \ + __init_wut_thread(); \ + } \ + WUMS_HOOK_EX(WUMS_HOOK_INIT_WUT_THREAD, on_init_wut_thread); #define WUMS_USE_WUT_SOCKETS() \ __EXTERN_C_MACRO void __init_wut_socket(); \ diff --git a/include/wums/meta.h b/include/wums/meta.h index a0c3627..ebe5da7 100644 --- a/include/wums/meta.h +++ b/include/wums/meta.h @@ -39,7 +39,7 @@ extern "C" { #endif -#define WUMS_VERSION "0.3.4" +#define WUMS_VERSION "0.3.5" #define WUMS_MODULE_EXPORT_NAME(__module_name) \ WUMS_META(export_name, __module_name); \ @@ -47,7 +47,7 @@ extern "C" { WUMS_USE_WUT_MALLOC(); \ WUMS_USE_WUT_SOCKETS(); \ WUMS_USE_WUT_NEWLIB(); \ - WUMS_USE_WUT_STDCPP(); \ + WUMS_USE_WUT_THREAD(); \ WUMS___INIT_WRAPPER(); \ WUMS___FINI_WRAPPER(); \ WUMS_META(buildtimestamp, __DATE__ " " __TIME__); \