harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wjwashb...@apache.org
Subject svn commit: r514935 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
Date Tue, 06 Mar 2007 00:50:06 GMT
Author: wjwashburn
Date: Mon Mar  5 16:50:05 2007
New Revision: 514935

URL: http://svn.apache.org/viewvc?view=rev&rev=514935
Log:
H3253, this patch makes thread terminated state accurate
build, build test pass on windowsxp32 and RHEL 32 w/ gcc 4.0.2


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java?view=diff&rev=514935&r1=514934&r2=514935
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
Mon Mar  5 16:50:05 2007
@@ -792,7 +792,13 @@
      * @com.intel.drl.spec_ref
      */
     public Thread.State  getState() {
-        
+
+	boolean dead = false;
+	synchronized(lock) {
+		if(started && !isAlive() ) dead = true;
+	}
+	if (dead) return State.TERMINATED;
+     
         int state = (VMThreadManager.getState(this));
 
         if (0 != (state & VMThreadManager.JVMTI_THREAD_STATE_TERMINATED)) {         



Mime
View raw message