You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by mc...@apache.org on 2008/03/26 12:33:05 UTC

svn commit: r641264 - /harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_thin_monitor.c

Author: mcfirst
Date: Wed Mar 26 04:33:01 2008
New Revision: 641264

URL: http://svn.apache.org/viewvc?rev=641264&view=rev
Log:
Applying the patch from HARMONY-5172 [drlvm][thread] Failed assertion on realibility test in lock unreservation code

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

Modified: harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_thin_monitor.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_thin_monitor.c?rev=641264&r1=641263&r2=641264&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_thin_monitor.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_thin_monitor.c Wed Mar 26 04:33:01 2008
@@ -193,18 +193,19 @@
         assert(owner);
         assert(hythread_get_id(owner) == lock_id);
         assert(owner != hythread_self());
-        if(owner->state& 
-                          ( TM_THREAD_STATE_TERMINATED|
-                            TM_THREAD_STATE_WAITING|
-        		    TM_THREAD_STATE_WAITING_INDEFINITELY|
-        		    TM_THREAD_STATE_WAITING_WITH_TIMEOUT|
-        		    TM_THREAD_STATE_SLEEPING|
-        		    TM_THREAD_STATE_SUSPENDED|
-        		    TM_THREAD_STATE_IN_MONITOR_WAIT )
-        ) {
+        if(owner->state
+                & (TM_THREAD_STATE_TERMINATED
+                    | TM_THREAD_STATE_WAITING
+                    | TM_THREAD_STATE_WAITING_INDEFINITELY
+                    | TM_THREAD_STATE_WAITING_WITH_TIMEOUT
+                    | TM_THREAD_STATE_SLEEPING
+                    | TM_THREAD_STATE_PARKED
+                    | TM_THREAD_STATE_SUSPENDED
+                    | TM_THREAD_STATE_IN_MONITOR_WAIT))
+        {
             append = 0;
         } else {
-           append = RESERVED_BITMASK;
+            append = RESERVED_BITMASK;
         }
 
         status=hythread_suspend_other(owner);
@@ -389,7 +390,6 @@
 #endif //SPIN_COUNT
                     return status;
                 }
-                assert(!IS_RESERVED(*lockword_ptr));
                 return hythread_thin_monitor_try_enter(lockword_ptr);
             }
 #endif