2003-01-06 Martin Baulig <martin@ximian.com>
authorMartin Baulig <martin@novell.com>
Mon, 6 Jan 2003 13:37:17 +0000 (13:37 -0000)
committerMartin Baulig <martin@novell.com>
Mon, 6 Jan 2003 13:37:17 +0000 (13:37 -0000)
* debug.c: Correctly handle the `debugger_finished_mutex'; it is
only unlocked by the pthread_cond_wait() in mono_debugger_wait().

svn path=/trunk/mono/; revision=10199

mono/jit/ChangeLog
mono/jit/debug.c

index 7a56371c13ea70e8d987437eb70a2b94882deaf7..1d25fb66ac92a2c9d1140a965d38a4811a24c83f 100644 (file)
@@ -1,6 +1,12 @@
+2003-01-06  Martin Baulig  <martin@ximian.com>
+
+       * debug.c: Correctly handle the `debugger_finished_mutex'; it is
+       only unlocked by the pthread_cond_wait() in mono_debugger_wait().
+
 2003-01-04 Jackson Harper <jackson@latitudegeo.com>
 
-       * debug.c: Move must_send_finished var declaration out of #if win32 block (this fixes the build on win32)
+       * debug.c: Move must_send_finished var declaration out of #if win32
+       block (this fixes the build on win32)
 
 2003-01-05  Martin Baulig  <martin@ximian.com>
 
index 8706a1fa8afe60d4550472fc6f4e55955cad09e3..0ffde64565772c93d696a2d5db6d641a441d41dd 100644 (file)
@@ -109,9 +109,7 @@ static void
 mono_debugger_wait (void)
 {
 #ifndef PLATFORM_WIN32
-       pthread_mutex_lock (&debugger_finished_mutex);
        pthread_cond_wait (&debugger_finished_cond, &debugger_finished_mutex);
-       pthread_mutex_unlock (&debugger_finished_mutex);
 #endif
 }
 
@@ -1393,6 +1391,12 @@ initialize_debugger_support ()
 #ifndef PLATFORM_WIN32
        pthread_mutex_lock (&debugger_start_mutex);
 
+       /*
+        * This mutex is only unlocked by the pthread_cond_wait() in
+        * mono_debugger_wait().
+        */
+       pthread_mutex_lock (&debugger_finished_mutex);
+
        ret = pthread_create (&thread, NULL, debugger_thread_func, ptr);
        g_assert (ret == 0);