harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r613902 - /harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_park.c
Date Mon, 21 Jan 2008 14:31:44 GMT
Author: gshimansky
Date: Mon Jan 21 06:31:44 2008
New Revision: 613902

URL: http://svn.apache.org/viewvc?rev=613902&view=rev
Log:
Applied patch from HARMONY-5403
[drlvm][thread] regression after Thread.interrupt refactoring


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

Modified: harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_park.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_park.c?rev=613902&r1=613901&r2=613902&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_park.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_park.c Mon Jan 21 06:31:44 2008
@@ -127,8 +127,12 @@
     assert(status == TM_ERROR_NONE);
 
     if (thread->state & TM_THREAD_STATE_PARKED) {
+        thread->state &= ~TM_THREAD_STATE_PARKED;
         mon = thread->waited_monitor;
         assert(mon);
+        status = hymutex_unlock(&thread->mutex);
+        assert(status == TM_ERROR_NONE);
+
         // Notify parked thread
         status = hymutex_lock(&mon->mutex);
         assert(status == TM_ERROR_NONE);
@@ -138,9 +142,7 @@
         assert(status == TM_ERROR_NONE);
     } else {
         thread->state |= TM_THREAD_STATE_UNPARKED;
+        status = hymutex_unlock(&thread->mutex);
+        assert(status == TM_ERROR_NONE);
     }
-
-    thread->state &= ~TM_THREAD_STATE_PARKED;
-    status = hymutex_unlock(&thread->mutex);
-    assert(status == TM_ERROR_NONE);
 }



Mime
View raw message