Jacek Caban : winex11.drv: Added ThreadDetach entry point and use it instead of DllMain.
Alexandre Julliard
julliard at winehq.org
Tue Aug 30 10:30:45 CDT 2016
Module: wine
Branch: master
Commit: af9f722361800c17875964007b4f5f276db5cd4c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=af9f722361800c17875964007b4f5f276db5cd4c
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Aug 29 19:58:20 2016 +0200
winex11.drv: Added ThreadDetach entry point and use it instead of DllMain.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winex11.drv/winex11.drv.spec | 1 +
dlls/winex11.drv/x11drv_main.c | 8 +++-----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/winex11.drv/winex11.drv.spec b/dlls/winex11.drv/winex11.drv.spec
index 7cdce52..ceb0f56 100644
--- a/dlls/winex11.drv/winex11.drv.spec
+++ b/dlls/winex11.drv/winex11.drv.spec
@@ -53,6 +53,7 @@
@ cdecl WindowPosChanging(long long long ptr ptr ptr ptr) X11DRV_WindowPosChanging
@ cdecl WindowPosChanged(long long long ptr ptr ptr ptr ptr) X11DRV_WindowPosChanged
@ cdecl SystemParametersInfo(long long ptr long) X11DRV_SystemParametersInfo
+@ cdecl ThreadDetach() X11DRV_ThreadDetach
# WinTab32
@ cdecl AttachEventQueueToTablet(long) X11DRV_AttachEventQueueToTablet
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
index d4f5c84..c2e0969 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -597,9 +597,9 @@ static BOOL process_attach(void)
/***********************************************************************
- * X11DRV thread termination routine
+ * ThreadDetach (X11DRV.@)
*/
-static void thread_detach(void)
+void CDECL X11DRV_ThreadDetach(void)
{
struct x11drv_thread_data *data = TlsGetValue( thread_data_tls_index );
@@ -690,12 +690,10 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
switch(reason)
{
case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls( hinst );
x11drv_module = hinst;
ret = process_attach();
break;
- case DLL_THREAD_DETACH:
- thread_detach();
- break;
}
return ret;
}
More information about the wine-cvs
mailing list