You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by gs...@apache.org on 2007/03/27 15:56:08 UTC

svn commit: r522911 - /harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_basic.c

Author: gshimansky
Date: Tue Mar 27 06:56:07 2007
New Revision: 522911

URL: http://svn.apache.org/viewvc?view=rev&rev=522911
Log:
Applied fix for HARMONY-3504 [drlvm][thread] ThreadGroupTest is failed

The failed assertion is commented since it is not possible to reliably
check 2 conditions atomically


Modified:
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_basic.c

Modified: harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_basic.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_basic.c?view=diff&rev=522911&r1=522910&r2=522911
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_basic.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_basic.c Tue Mar 27 06:56:07 2007
@@ -481,9 +481,14 @@
         apr_atomic_dec32(&tm_native_thread->request);
     }
 
-    // if there is no competition, it would be 1, but if someone else
-    // is suspending the same thread simultaneously, it could be greater than 1
-    assert(tm_native_thread->request > 0);
+    // if there is no competition, it would be 1, but if someone else is
+    // suspending the same thread simultaneously, it could be greater than 1
+    // if safepoint callback isn't set it could be equal to 0.
+    //
+    // The following assertion may be false because at each time
+    // one of the conditions is true, and the other is false, but
+    // when checking the whole condition it may be failse in the result.
+    // assert(tm_native_thread->request > 0 || tm_native_thread->safepoint_callback == NULL);
 
     // notify the thread that it may wake up now,
     // so that it would eventually reach exception safepoint