Dump the tid in RtlpWaitForCriticalSection`

Francois Gouget fgouget at free.fr
Sat May 18 21:28:47 CDT 2002


The problem is that RtlpWaitForCriticalSection dumps %fs. This is
related to the thread id but in a typical trace you don't have the
required information to map one to the other (or you have to hunt).

Relay traces dump the thread id so I figured it would be nice if
RtlpWaitForCriticalSection just dumped the thread id instead of %fs.
That way you would immediately know if that critical section timeout
happens in the thread you have just above or not.


--
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
                           La terre est une bêta...

Index: dlls/ntdll/critsection.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/critsection.c,v
retrieving revision 1.8
diff -u -r1.8 critsection.c
--- dlls/ntdll/critsection.c	25 Apr 2002 21:40:56 -0000	1.8
+++ dlls/ntdll/critsection.c	19 May 2002 02:14:05 -0000
@@ -118,13 +118,13 @@
         {
             const char *name = (char *)crit->DebugInfo;
             if (!name || IsBadStringPtrA(name,80)) name = "?";
-            ERR( "section %p %s wait timed out, retrying (60 sec) fs=%04x\n",
-                 crit, debugstr_a(name), __get_fs() );
+            ERR( "section %p %s wait timed out, retrying (60 sec) tid=%08x\n",
+                 crit, debugstr_a(name), GetCurrentThreadId() );
             res = WaitForSingleObject( sem, 60000L );
             if ( res == WAIT_TIMEOUT && TRACE_ON(relay) )
             {
-                ERR( "section %p %s wait timed out, retrying (5 min) fs=%04x\n",
-                     crit, debugstr_a(name), __get_fs() );
+                ERR( "section %p %s wait timed out, retrying (5 min) tid=%08x\n",
+                     crit, debugstr_a(name), GetCurrentThreadId() );
                 res = WaitForSingleObject( sem, 300000L );
             }
         }




More information about the wine-patches mailing list