* src/threads/native/threads.c (threads_detach_thread): Fixed debug output and
authorMichael Starzinger <michi@complang.tuwien.ac.at>
Mon, 8 Oct 2007 22:19:05 +0000 (00:19 +0200)
committerMichael Starzinger <michi@complang.tuwien.ac.at>
Mon, 8 Oct 2007 22:19:05 +0000 (00:19 +0200)
compiler warning.

src/threads/native/threads.c

index 8e5d7ba71684fbe33ed03e14ad82de1c962102fc..6cf575f3d6f1f1b87cd6f0393bff3cec98b5505b 100644 (file)
@@ -1512,6 +1512,8 @@ bool threads_detach_thread(threadobject *t)
        java_handle_t         *o;
 #endif
 
+       DEBUGTHREADS("detaching", t);
+
 #if defined(ENABLE_JAVASE)
        object = (java_lang_Thread *) threads_thread_get_object(t);
 
@@ -1597,12 +1599,10 @@ bool threads_detach_thread(threadobject *t)
 
        threads_thread_state_terminated(t);
 
-       DEBUGTHREADS("detaching", t);
-
-    /* Notify all threads waiting on this thread.  These are joining
+       /* Notify all threads waiting on this thread.  These are joining
           this thread. */
 
-       o = (java_object_t *) object;
+       o = (java_handle_t *) object;
 
        /* XXX Care about exceptions? */
        (void) lock_monitor_enter(o);