From 8408358c9d3d02fa87ed7667ecef7f8a74f2bf3a Mon Sep 17 00:00:00 2001 From: Jamie Reece Wilson Date: Sat, 28 Oct 2023 15:30:28 +0100 Subject: [PATCH] [*] manually call mi_thread_done to avoid fls --- Source/AuRTEntrypoint.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Source/AuRTEntrypoint.cpp b/Source/AuRTEntrypoint.cpp index ac7d11e0..e3316517 100644 --- a/Source/AuRTEntrypoint.cpp +++ b/Source/AuRTEntrypoint.cpp @@ -37,7 +37,7 @@ #include "Threading/AuSleep.hpp" #include "Memory/Cache.hpp" #include "Threading/Primitives/SMTYield.hpp" - +#include #include "AuProcAddresses.hpp" #if defined(AURORA_IS_LINUX_DERIVED) @@ -248,7 +248,12 @@ BOOL WINAPI DllMain( { if (fdwReason == DLL_PROCESS_ATTACH) { - DisableThreadLibraryCalls(hinstDLL); + //DisableThreadLibraryCalls(hinstDLL); + } + + if (fdwReason == DLL_THREAD_DETACH) + { + mi_thread_done(); } return TRUE;