Call DisableThreadLibraryCalls() in order to slightly improve performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Changelog:
    Dmitry Timoshkov <dmitry@codeweavers.com>
    For all DLLs with defined DllMain and which do not require
    DLL_THREAD_ATTACH/DLL_THREAD_DETACH notifications, call
    DisableThreadLibraryCalls() in order to slightly improve
    performance on thread creation/exiting.

diff -u cvs/hq/wine/dlls/avifil32/factory.c wine/dlls/avifil32/factory.c
--- cvs/hq/wine/dlls/avifil32/factory.c	Sat Apr 19 10:56:29 2003
+++ wine/dlls/avifil32/factory.c	Mon Jun 30 17:16:19 2003
@@ -204,14 +204,10 @@ BOOL WINAPI DllMain(HINSTANCE hInstDll, 
 
   switch (fdwReason) {
   case DLL_PROCESS_ATTACH:
-    if (AVIFILE_hModule == NULL)
-      AVIFILE_hModule = (HMODULE)hInstDll;
+    DisableThreadLibraryCalls(hInstDll);
+    AVIFILE_hModule = (HMODULE)hInstDll;
     break;
   case DLL_PROCESS_DETACH:
-    break;
-  case DLL_THREAD_ATTACH:
-    break;
-  case DLL_THREAD_DETACH:
     break;
   };
 
diff -u cvs/hq/wine/dlls/comctl32/commctrl.c wine/dlls/comctl32/commctrl.c
--- cvs/hq/wine/dlls/comctl32/commctrl.c	Sun May 11 13:30:00 2003
+++ wine/dlls/comctl32/commctrl.c	Mon Jun 30 16:35:41 2003
@@ -145,6 +145,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, 
 
     switch (fdwReason) {
 	case DLL_PROCESS_ATTACH:
+            DisableThreadLibraryCalls(hinstDLL);
+
             COMCTL32_hModule = (HMODULE)hinstDLL;
 
             /* create private heap */
diff -u cvs/hq/wine/dlls/crtdll/crtdll_main.c wine/dlls/crtdll/crtdll_main.c
--- cvs/hq/wine/dlls/crtdll/crtdll_main.c	Fri Jan  3 13:20:46 2003
+++ wine/dlls/crtdll/crtdll_main.c	Mon Jun 30 17:17:37 2003
@@ -88,6 +88,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,D
   if (fdwReason == DLL_PROCESS_ATTACH)
   {
     DWORD version = GetVersion();
+
+    DisableThreadLibraryCalls(hinstDLL);
+
     CRTDLL__basemajor_dll   = (version >> 24) & 0xFF;
     CRTDLL__baseminor_dll   = (version >> 16) & 0xFF;
     CRTDLL__baseversion_dll = (version >> 16);
diff -u cvs/hq/wine/dlls/d3d8/d3d8_main.c wine/dlls/d3d8/d3d8_main.c
--- cvs/hq/wine/dlls/d3d8/d3d8_main.c	Sat Jun 28 14:30:38 2003
+++ wine/dlls/d3d8/d3d8_main.c	Mon Jun 30 16:40:55 2003
@@ -63,7 +63,11 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, 
     TRACE("fdwReason=%ld\n", fdwReason);
        if (fdwReason == DLL_PROCESS_ATTACH)
        {
-           HMODULE mod = GetModuleHandleA( "x11drv.dll" );
+           HMODULE mod;
+
+           DisableThreadLibraryCalls(hInstDLL);
+
+           mod = GetModuleHandleA( "x11drv.dll" );
            if (mod)
            {
                wine_tsx11_lock_ptr   = (void *)GetProcAddress( mod, "wine_tsx11_lock" );
diff -u cvs/hq/wine/dlls/ddraw/main.c wine/dlls/ddraw/main.c
--- cvs/hq/wine/dlls/ddraw/main.c	Fri Jun  6 13:01:37 2003
+++ wine/dlls/ddraw/main.c	Mon Jun 30 16:45:24 2003
@@ -579,7 +579,11 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, 
 
     if (fdwReason == DLL_PROCESS_ATTACH)
     {
-        HMODULE mod = GetModuleHandleA( "x11drv.dll" );
+        HMODULE mod;
+
+        DisableThreadLibraryCalls(hInstDLL);
+
+        mod = GetModuleHandleA( "x11drv.dll" );
         if (mod)
         {
             wine_tsx11_lock_ptr   = (void *)GetProcAddress( mod, "wine_tsx11_lock" );
diff -u cvs/hq/wine/dlls/dinput/dinput_main.c wine/dlls/dinput/dinput_main.c
--- cvs/hq/wine/dlls/dinput/dinput_main.c	Wed Jun 25 15:58:07 2003
+++ wine/dlls/dinput/dinput_main.c	Mon Jun 30 16:46:08 2003
@@ -60,6 +60,7 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWO
     switch(reason)
     {
       case DLL_PROCESS_ATTACH:
+        DisableThreadLibraryCalls(inst);
         DINPUT_instance = inst;
         break;
       case DLL_PROCESS_DETACH:
diff -u cvs/hq/wine/dlls/dmusic/dmusic_main.c wine/dlls/dmusic/dmusic_main.c
--- cvs/hq/wine/dlls/dmusic/dmusic_main.c	Sat Jun 28 14:30:39 2003
+++ wine/dlls/dmusic/dmusic_main.c	Mon Jun 30 16:48:48 2003
@@ -107,6 +107,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, 
 {
 	if (fdwReason == DLL_PROCESS_ATTACH)
 	{
+            DisableThreadLibraryCalls(hinstDLL);
 		/* FIXME: Initialisation */
 	}
 	else if (fdwReason == DLL_PROCESS_DETACH)
diff -u cvs/hq/wine/dlls/dplayx/dplayx_main.c wine/dlls/dplayx/dplayx_main.c
--- cvs/hq/wine/dlls/dplayx/dplayx_main.c	Tue Nov  5 14:52:30 2002
+++ wine/dlls/dplayx/dplayx_main.c	Mon Jun 30 16:51:15 2003
@@ -38,6 +38,7 @@ BOOL WINAPI DllMain( HINSTANCE hinstDLL,
   switch ( fdwReason )
   {
     case DLL_PROCESS_ATTACH:
+        DisableThreadLibraryCalls(hinstDLL);
         /* First instance perform construction of global processor data */
         return DPLAYX_ConstructData();
 
@@ -45,9 +46,6 @@ BOOL WINAPI DllMain( HINSTANCE hinstDLL,
         /* Last instance performs destruction of global processor data */
         return DPLAYX_DestructData();
 
-    case DLL_THREAD_ATTACH: /* Do nothing */
-    case DLL_THREAD_DETACH: /* Do nothing */
-      break;
     default:
       break;
 
diff -u cvs/hq/wine/dlls/dpnhpast/main.c wine/dlls/dpnhpast/main.c
--- cvs/hq/wine/dlls/dpnhpast/main.c	Wed May  7 14:54:35 2003
+++ wine/dlls/dpnhpast/main.c	Mon Jun 30 16:51:39 2003
@@ -35,6 +35,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, 
 
 	if (fdwReason == DLL_PROCESS_ATTACH)
 	{
+            DisableThreadLibraryCalls(hinstDLL);
 		/* FIXME: Initialisation */
 	}
 	else if (fdwReason == DLL_PROCESS_DETACH)
diff -u cvs/hq/wine/dlls/gdi/gdi_main.c wine/dlls/gdi/gdi_main.c
--- cvs/hq/wine/dlls/gdi/gdi_main.c	Tue Nov  5 14:52:30 2002
+++ wine/dlls/gdi/gdi_main.c	Mon Jun 30 16:28:38 2003
@@ -32,6 +32,7 @@
 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID lpvReserved)
 {
     if (reason != DLL_PROCESS_ATTACH) return TRUE;
+    DisableThreadLibraryCalls(hinstDLL);
     return GDI_Init();
 }
 
diff -u cvs/hq/wine/dlls/imagehlp/imagehlp_main.c wine/dlls/imagehlp/imagehlp_main.c
--- cvs/hq/wine/dlls/imagehlp/imagehlp_main.c	Sat Mar 29 11:15:17 2003
+++ wine/dlls/imagehlp/imagehlp_main.c	Mon Jun 30 16:52:43 2003
@@ -40,15 +40,12 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, 
   switch(fdwReason)
     {
     case DLL_PROCESS_ATTACH:
+      DisableThreadLibraryCalls(hinstDLL);
       IMAGEHLP_hHeap = HeapCreate(0, 0x10000, 0);
       break;
     case DLL_PROCESS_DETACH:
       HeapDestroy(IMAGEHLP_hHeap);
       IMAGEHLP_hHeap = NULL;
-      break;
-    case DLL_THREAD_ATTACH:
-      break;
-    case DLL_THREAD_DETACH:
       break;
     default:
       break;
diff -u cvs/hq/wine/dlls/imm32/imm.c wine/dlls/imm32/imm.c
--- cvs/hq/wine/dlls/imm32/imm.c	Thu May 15 19:26:00 2003
+++ wine/dlls/imm32/imm.c	Mon Jun 30 16:53:03 2003
@@ -86,6 +86,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, 
     switch (fdwReason)
     {
         case DLL_PROCESS_ATTACH:
+            DisableThreadLibraryCalls(hInstDLL);
             hImeInst = hInstDLL;
             break;
         case DLL_PROCESS_DETACH:
diff -u cvs/hq/wine/dlls/msacm/msacm32_main.c wine/dlls/msacm/msacm32_main.c
--- cvs/hq/wine/dlls/msacm/msacm32_main.c	Fri Jan 17 19:52:22 2003
+++ wine/dlls/msacm/msacm32_main.c	Mon Jun 30 16:54:17 2003
@@ -44,6 +44,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, 
 
     switch (fdwReason) {
     case DLL_PROCESS_ATTACH:
+        DisableThreadLibraryCalls(hInstDLL);
         MSACM_hHeap = HeapCreate(0, 0x10000, 0);
         MSACM_hInstance32 = hInstDLL;
         MSACM_RegisterAllDrivers();
@@ -53,10 +54,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, 
         HeapDestroy(MSACM_hHeap);
         MSACM_hHeap = NULL;
         MSACM_hInstance32 = NULL;
-	break;
-    case DLL_THREAD_ATTACH:
-	break;
-    case DLL_THREAD_DETACH:
 	break;
     default:
 	break;
diff -u cvs/hq/wine/dlls/msisys/Makefile.in wine/dlls/msisys/Makefile.in
--- cvs/hq/wine/dlls/msisys/Makefile.in	Sat May 18 16:24:48 2002
+++ wine/dlls/msisys/Makefile.in	Mon Jun 30 17:19:01 2003
@@ -3,6 +3,7 @@ TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = msisys.ocx
+IMPORTS   = kernel32
 EXTRALIBS = $(LIBUUID)
 
 LDDLLFLAGS = @LDDLLFLAGS@
diff -u cvs/hq/wine/dlls/msisys/msisys.c wine/dlls/msisys/msisys.c
--- cvs/hq/wine/dlls/msisys/msisys.c	Tue Nov  5 14:52:32 2002
+++ wine/dlls/msisys/msisys.c	Mon Jun 30 16:55:15 2003
@@ -62,15 +62,12 @@ BOOL WINAPI DllMain(
 	switch ( fdwReason )
 	{
 	case DLL_PROCESS_ATTACH:
+                DisableThreadLibraryCalls(hInstDLL);
 		if ( !MSISYS_InitProcess() )
 			return FALSE;
 		break;
 	case DLL_PROCESS_DETACH:
 		MSISYS_UninitProcess();
-		break;
-	case DLL_THREAD_ATTACH:
-		break;
-	case DLL_THREAD_DETACH:
 		break;
 	}
 
diff -u cvs/hq/wine/dlls/msvideo/msrle32/msrle32.c wine/dlls/msvideo/msrle32/msrle32.c
--- cvs/hq/wine/dlls/msvideo/msrle32/msrle32.c	Mon Jun 30 16:20:48 2003
+++ wine/dlls/msvideo/msrle32/msrle32.c	Mon Jun 30 16:56:25 2003
@@ -1902,13 +1902,10 @@ BOOL WINAPI DllMain(HINSTANCE hModule, D
 
   switch (dwReason) {
   case DLL_PROCESS_ATTACH:
-    if (MSRLE32_hModule == 0)
-      MSRLE32_hModule = hModule;
-    break;
-  case DLL_THREAD_ATTACH:
-    break;
-  case DLL_THREAD_DETACH:
+    DisableThreadLibraryCalls(hModule);
+    MSRLE32_hModule = hModule;
     break;
+
   case DLL_PROCESS_DETACH:
     break;
   };
diff -u cvs/hq/wine/dlls/netapi32/netapi32.c wine/dlls/netapi32/netapi32.c
--- cvs/hq/wine/dlls/netapi32/netapi32.c	Wed Jun 25 15:58:24 2003
+++ wine/dlls/netapi32/netapi32.c	Mon Jun 30 16:57:09 2003
@@ -110,6 +110,7 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL,
 
     switch (fdwReason) {
 	case DLL_PROCESS_ATTACH:
+            DisableThreadLibraryCalls(hinstDLL);
             NETAPI32_hModule = hinstDLL;
 	    break;
 	case DLL_PROCESS_DETACH:
diff -u cvs/hq/wine/dlls/odbc32/Makefile.in wine/dlls/odbc32/Makefile.in
--- cvs/hq/wine/dlls/odbc32/Makefile.in	Mon Jun  3 13:00:57 2002
+++ wine/dlls/odbc32/Makefile.in	Mon Jun 30 17:20:58 2003
@@ -3,6 +3,7 @@ TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = odbc32.dll
+IMPORTS   = kernel32
 
 LDDLLFLAGS = @LDDLLFLAGS@
 SYMBOLFILE = $(MODULE).tmp.o
diff -u cvs/hq/wine/dlls/odbc32/proxyodbc.c wine/dlls/odbc32/proxyodbc.c
--- cvs/hq/wine/dlls/odbc32/proxyodbc.c	Sun Mar 16 19:32:37 2003
+++ wine/dlls/odbc32/proxyodbc.c	Mon Jun 30 16:57:44 2003
@@ -176,6 +176,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, 
     if (fdwReason == DLL_PROCESS_ATTACH)
     {
        TRACE("Loading ODBC...\n");
+       DisableThreadLibraryCalls(hinstDLL);
        if (ODBC_LoadDriverManager())
           ODBC_LoadDMFunctions();
     }
diff -u cvs/hq/wine/dlls/ole32/ole32_main.c wine/dlls/ole32/ole32_main.c
--- cvs/hq/wine/dlls/ole32/ole32_main.c	Tue May 20 14:07:27 2003
+++ wine/dlls/ole32/ole32_main.c	Mon Jun 30 16:58:19 2003
@@ -97,6 +97,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, 
 
     switch(fdwReason) {
     case DLL_PROCESS_ATTACH:
+        DisableThreadLibraryCalls(hinstDLL);
         OLE32_hInstance = hinstDLL;
         COMPOBJ_InitProcess();
 	if (TRACE_ON(ole)) CoRegisterMallocSpy((LPVOID)-1);
diff -u cvs/hq/wine/dlls/opengl32/wgl.c wine/dlls/opengl32/wgl.c
--- cvs/hq/wine/dlls/opengl32/wgl.c	Wed May  7 14:54:40 2003
+++ wine/dlls/opengl32/wgl.c	Mon Jun 30 16:59:15 2003
@@ -683,6 +683,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DW
     switch(reason)
     {
     case DLL_PROCESS_ATTACH:
+        DisableThreadLibraryCalls(hinst);
         return process_attach();
     case DLL_PROCESS_DETACH:
         process_detach();
diff -u cvs/hq/wine/dlls/quartz/main.c wine/dlls/quartz/main.c
--- cvs/hq/wine/dlls/quartz/main.c	Sat Jun 14 15:30:24 2003
+++ wine/dlls/quartz/main.c	Mon Jun 30 16:59:51 2003
@@ -34,6 +34,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, 
 {
     switch(fdwReason) {
         case DLL_PROCESS_ATTACH:
+            DisableThreadLibraryCalls(hInstDLL);
 	    break;
 	case DLL_PROCESS_DETACH:
 	    break;
diff -u cvs/hq/wine/dlls/richedit/richedit.c wine/dlls/richedit/richedit.c
--- cvs/hq/wine/dlls/richedit/richedit.c	Sun Mar 16 19:32:38 2003
+++ wine/dlls/richedit/richedit.c	Mon Jun 30 17:00:12 2003
@@ -71,6 +71,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, 
     switch (fdwReason)
     {
     case DLL_PROCESS_ATTACH:
+        DisableThreadLibraryCalls(hinstDLL);
         /* create private heap */
         RICHED32_hHeap = HeapCreate (0, 0x10000, 0);
         /* register the Rich Edit class */
diff -u cvs/hq/wine/dlls/rpcrt4/rpcrt4_main.c wine/dlls/rpcrt4/rpcrt4_main.c
--- cvs/hq/wine/dlls/rpcrt4/rpcrt4_main.c	Wed May 14 15:25:51 2003
+++ wine/dlls/rpcrt4/rpcrt4_main.c	Mon Jun 30 17:00:40 2003
@@ -167,6 +167,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, 
 {
     switch (fdwReason) {
     case DLL_PROCESS_ATTACH:
+        DisableThreadLibraryCalls(hinstDLL);
         master_mutex = CreateMutexA( NULL, FALSE, RPCSS_MASTER_MUTEX_NAME);
         if (!master_mutex)
           ERR("Failed to create master mutex\n");
diff -u cvs/hq/wine/dlls/serialui/confdlg.c wine/dlls/serialui/confdlg.c
--- cvs/hq/wine/dlls/serialui/confdlg.c	Wed Jun 25 15:58:31 2003
+++ wine/dlls/serialui/confdlg.c	Mon Jun 30 17:01:09 2003
@@ -65,6 +65,7 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL,
 
     switch (fdwReason) {
 	case DLL_PROCESS_ATTACH:
+            DisableThreadLibraryCalls(hinstDLL);
             SERIALUI_hModule = hinstDLL;
 	    break;
 	case DLL_PROCESS_DETACH:
diff -u cvs/hq/wine/dlls/shlwapi/shlwapi_main.c wine/dlls/shlwapi/shlwapi_main.c
--- cvs/hq/wine/dlls/shlwapi/shlwapi_main.c	Thu Mar 20 11:23:37 2003
+++ wine/dlls/shlwapi/shlwapi_main.c	Mon Jun 30 17:04:03 2003
@@ -65,6 +65,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, 
 	switch (fdwReason)
 	{
 	  case DLL_PROCESS_ATTACH:
+            DisableThreadLibraryCalls(hinstDLL);
 	    shlwapi_hInstance = hinstDLL;
 	    SHLWAPI_ThreadRef_index = TlsAlloc();
 	    break;
diff -u cvs/hq/wine/dlls/snmpapi/Makefile.in wine/dlls/snmpapi/Makefile.in
--- cvs/hq/wine/dlls/snmpapi/Makefile.in	Sat May 18 16:24:49 2002
+++ wine/dlls/snmpapi/Makefile.in	Mon Jun 30 17:22:49 2003
@@ -3,6 +3,7 @@ TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = snmpapi.dll
+IMPORTS   = kernel32
 
 LDDLLFLAGS = @LDDLLFLAGS@
 SYMBOLFILE = $(MODULE).tmp.o
diff -u cvs/hq/wine/dlls/snmpapi/main.c wine/dlls/snmpapi/main.c
--- cvs/hq/wine/dlls/snmpapi/main.c	Tue Nov  5 14:52:35 2002
+++ wine/dlls/snmpapi/main.c	Mon Jun 30 17:04:47 2003
@@ -38,12 +38,9 @@ BOOL WINAPI DllMain(
 
     switch(fdwReason) {
     case DLL_PROCESS_ATTACH:
+        DisableThreadLibraryCalls(hInstDLL);
         break;
     case DLL_PROCESS_DETACH:
-        break;
-    case DLL_THREAD_ATTACH:
-        break;
-    case DLL_THREAD_DETACH:
         break;
     }
 
diff -u cvs/hq/wine/dlls/ttydrv/ttydrv_main.c wine/dlls/ttydrv/ttydrv_main.c
--- cvs/hq/wine/dlls/ttydrv/ttydrv_main.c	Sat Dec  7 20:04:38 2002
+++ wine/dlls/ttydrv/ttydrv_main.c	Mon Jun 30 17:05:42 2003
@@ -76,6 +76,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DW
     switch(reason)
     {
     case DLL_PROCESS_ATTACH:
+        DisableThreadLibraryCalls(hinst);
         process_attach();
         break;
 
diff -u cvs/hq/wine/dlls/twain/twain32_main.c wine/dlls/twain/twain32_main.c
--- cvs/hq/wine/dlls/twain/twain32_main.c	Tue Nov  5 14:52:35 2002
+++ wine/dlls/twain/twain32_main.c	Mon Jun 30 17:06:11 2003
@@ -33,13 +33,8 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL,
     switch (fdwReason)
     {
         case DLL_PROCESS_ATTACH:
+            DisableThreadLibraryCalls(hinstDLL);
             DSM_currentState = 2;
-            break;
-
-        case DLL_THREAD_ATTACH:
-            break;
-
-        case DLL_THREAD_DETACH:
             break;
 
         case DLL_PROCESS_DETACH:
diff -u cvs/hq/wine/dlls/urlmon/urlmon_main.c wine/dlls/urlmon/urlmon_main.c
--- cvs/hq/wine/dlls/urlmon/urlmon_main.c	Tue Nov  5 14:52:35 2002
+++ wine/dlls/urlmon/urlmon_main.c	Mon Jun 30 17:24:45 2003
@@ -18,7 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include "windef.h"
+#include "winbase.h"
 #include "winerror.h"
 #include "wtypes.h"
 
@@ -39,6 +39,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, 
 
     switch(fdwReason) {
     case DLL_PROCESS_ATTACH:
+        DisableThreadLibraryCalls(hinstDLL);
         URLMON_hInstance = hinstDLL;
 	break;
 
diff -u cvs/hq/wine/dlls/winaspi/winaspi32.c wine/dlls/winaspi/winaspi32.c
--- cvs/hq/wine/dlls/winaspi/winaspi32.c	Sun Mar 16 19:32:38 2003
+++ wine/dlls/winaspi/winaspi32.c	Mon Jun 30 17:08:56 2003
@@ -62,14 +62,12 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, 
 	switch( fdwReason )
 	{
 	case DLL_PROCESS_ATTACH:
+            DisableThreadLibraryCalls(hInstDLL);
             SCSI_Init();
             break;
 	case DLL_PROCESS_DETACH:
             DeleteCriticalSection( &ASPI_CritSection );
             break;
-	case DLL_THREAD_ATTACH:
-	case DLL_THREAD_DETACH:
-		break;
 	}
 #endif /* defined(linux) */
 	return TRUE;
diff -u cvs/hq/wine/dlls/winedos/dosvm.c wine/dlls/winedos/dosvm.c
--- cvs/hq/wine/dlls/winedos/dosvm.c	Sat Jun 28 14:30:53 2003
+++ wine/dlls/winedos/dosvm.c	Mon Jun 30 17:09:27 2003
@@ -688,6 +688,7 @@ BOOL WINAPI DllMain( HINSTANCE hinstDLL,
 
     if (fdwReason == DLL_PROCESS_ATTACH)
     {
+        DisableThreadLibraryCalls(hinstDLL);
         DOSVM_InitSegments();
 
         event_notifier = CreateEventA(NULL, FALSE, FALSE, NULL);
diff -u cvs/hq/wine/dlls/wineps/init.c wine/dlls/wineps/init.c
--- cvs/hq/wine/dlls/wineps/init.c	Wed Jun 25 15:58:36 2003
+++ wine/dlls/wineps/init.c	Mon Jun 30 17:10:15 2003
@@ -121,6 +121,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DW
     switch(reason) {
 
 	case DLL_PROCESS_ATTACH:
+            DisableThreadLibraryCalls(hinst);
 
 	    PSDRV_Heap = HeapCreate(0, 0x10000, 0);
 	    if (PSDRV_Heap == NULL)
diff -u cvs/hq/wine/dlls/winmm/mciavi/mciavi.c wine/dlls/winmm/mciavi/mciavi.c
--- cvs/hq/wine/dlls/winmm/mciavi/mciavi.c	Wed Feb 12 23:03:21 2003
+++ wine/dlls/winmm/mciavi/mciavi.c	Mon Jun 30 17:11:56 2003
@@ -122,6 +122,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, 
 {
     switch (fdwReason) {
     case DLL_PROCESS_ATTACH:
+        DisableThreadLibraryCalls(hInstDLL);
 	MCIAVI_hInstance = hInstDLL;
 	break;
     }
diff -u cvs/hq/wine/dlls/winmm/winmm.c wine/dlls/winmm/winmm.c
--- cvs/hq/wine/dlls/winmm/winmm.c	Sun May 11 13:30:12 2003
+++ wine/dlls/winmm/winmm.c	Mon Jun 30 17:12:48 2003
@@ -125,6 +125,8 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, 
 
     switch (fdwReason) {
     case DLL_PROCESS_ATTACH:
+        DisableThreadLibraryCalls(hInstDLL);
+
 	if (!WINMM_CreateIData(hInstDLL))
 	    return FALSE;
         if (!MCI_Init() || !MMDRV_Init()) {
@@ -140,9 +142,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, 
         DRIVER_UnloadAll();
 
 	WINMM_DeleteIData();
-	break;
-    case DLL_THREAD_ATTACH:
-    case DLL_THREAD_DETACH:
 	break;
     }
     return TRUE;
diff -u cvs/hq/wine/dlls/winsock/socket.c wine/dlls/winsock/socket.c
--- cvs/hq/wine/dlls/winsock/socket.c	Thu Jun 26 18:42:51 2003
+++ wine/dlls/winsock/socket.c	Mon Jun 30 17:13:19 2003
@@ -444,6 +444,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, 
     TRACE("%p 0x%lx %p\n", hInstDLL, fdwReason, fImpLoad);
     switch (fdwReason) {
     case DLL_PROCESS_ATTACH:
+        DisableThreadLibraryCalls(hInstDLL);
         opentype_tls_index = TlsAlloc();
         break;
     case DLL_PROCESS_DETACH:
diff -u cvs/hq/wine/dlls/winspool/wspool.c wine/dlls/winspool/wspool.c
--- cvs/hq/wine/dlls/winspool/wspool.c	Thu Jan  9 20:46:14 2003
+++ wine/dlls/winspool/wspool.c	Mon Jun 30 17:14:08 2003
@@ -41,6 +41,8 @@ BOOL WINAPI DllMain(HINSTANCE hInstance,
   {
     case DLL_PROCESS_ATTACH: {
       extern void WINSPOOL_LoadSystemPrinters();
+
+      DisableThreadLibraryCalls(hInstance);
       WINSPOOL_LoadSystemPrinters();
       break;
     }





[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux