Merge branch 'sgen-job-distribution'
[mono.git] / mono / metadata / threads.c
index 58b0edabe45ea476fca3246b1d60eb296a90f8ad..2a57beb94258a51be43cbc4b9b92075b1ed27bbb 100644 (file)
@@ -251,7 +251,7 @@ static gboolean handle_store(MonoThread *thread)
 {
        mono_threads_lock ();
 
-       THREAD_DEBUG (g_message ("%s: thread %p ID %"G_GSIZE_FORMAT, __func__, thread, (gsize)thread->tid));
+       THREAD_DEBUG (g_message ("%s: thread %p ID %"G_GSIZE_FORMAT, __func__, thread, (gsize)thread->internal_thread->tid));
 
        if (threads_starting_up)
                mono_g_hash_table_remove (threads_starting_up, thread);
@@ -733,7 +733,7 @@ static guint32 WINAPI start_wrapper_internal(void *data)
 
        LIBGC_DEBUG (g_message ("%s: (%"G_GSIZE_FORMAT",%d) Setting thread stack to %p", __func__, GetCurrentThreadId (), getpid (), thread->stack_ptr));
 
-       THREAD_DEBUG (g_message ("%s: (%"G_GSIZE_FORMAT") Setting current_object_key to %p", __func__, GetCurrentThreadId (), thread));
+       THREAD_DEBUG (g_message ("%s: (%"G_GSIZE_FORMAT") Setting current_object_key to %p", __func__, GetCurrentThreadId (), internal));
 
        /* On 2.0 profile (and higher), set explicitly since state might have been
           Unknown */
@@ -758,7 +758,7 @@ static guint32 WINAPI start_wrapper_internal(void *data)
 
        g_free (start_info);
        THREAD_DEBUG (g_message ("%s: start_wrapper for %"G_GSIZE_FORMAT, __func__,
-                                                        thread->tid));
+                                                        internal->tid));
 
        /* 
         * Call this after calling start_notify, since the profiler callback might want
@@ -1106,7 +1106,7 @@ mono_thread_detach (MonoThread *thread)
 {
        g_return_if_fail (thread != NULL);
 
-       THREAD_DEBUG (g_message ("%s: mono_thread_detach for %p (%"G_GSIZE_FORMAT")", __func__, thread, (gsize)thread->tid));
+       THREAD_DEBUG (g_message ("%s: mono_thread_detach for %p (%"G_GSIZE_FORMAT")", __func__, thread, (gsize)thread->internal_thread->tid));
        
        thread_cleanup (thread->internal_thread);
 
@@ -1259,7 +1259,7 @@ static void mono_thread_start (MonoThread *thread)
 {
        MonoInternalThread *internal = thread->internal_thread;
 
-       THREAD_DEBUG (g_message ("%s: (%"G_GSIZE_FORMAT") Launching thread %p (%"G_GSIZE_FORMAT")", __func__, GetCurrentThreadId (), thread, (gsize)thread->tid));
+       THREAD_DEBUG (g_message ("%s: (%"G_GSIZE_FORMAT") Launching thread %p (%"G_GSIZE_FORMAT")", __func__, GetCurrentThreadId (), internal, (gsize)internal->tid));
 
        /* Only store the handle when the thread is about to be
         * launched, to avoid the main thread deadlocking while trying
@@ -1277,14 +1277,14 @@ static void mono_thread_start (MonoThread *thread)
                 * started
                 */
 
-               THREAD_DEBUG (g_message ("%s: (%"G_GSIZE_FORMAT") waiting for thread %p (%"G_GSIZE_FORMAT") to start", __func__, GetCurrentThreadId (), thread, (gsize)thread->tid));
+               THREAD_DEBUG (g_message ("%s: (%"G_GSIZE_FORMAT") waiting for thread %p (%"G_GSIZE_FORMAT") to start", __func__, GetCurrentThreadId (), internal, (gsize)internal->tid));
 
                WaitForSingleObjectEx (internal->start_notify, INFINITE, FALSE);
                CloseHandle (internal->start_notify);
                internal->start_notify = NULL;
        }
 
-       THREAD_DEBUG (g_message ("%s: (%"G_GSIZE_FORMAT") Done launching thread %p (%"G_GSIZE_FORMAT")", __func__, GetCurrentThreadId (), thread, (gsize)thread->tid));
+       THREAD_DEBUG (g_message ("%s: (%"G_GSIZE_FORMAT") Done launching thread %p (%"G_GSIZE_FORMAT")", __func__, GetCurrentThreadId (), internal, (gsize)internal->tid));
 }
 
 void ves_icall_System_Threading_Thread_Sleep_internal(gint32 ms)