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/16 15:35:33 UTC

svn commit: r518987 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/mon_enter_exit.cpp

Author: gshimansky
Date: Fri Mar 16 07:35:32 2007
New Revision: 518987

URL: http://svn.apache.org/viewvc?view=rev&rev=518987
Log:
HARMONY-3410 [drlvm] Exception shouldn't be thrown from vm_monitor_exit_synchronized_method()


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/mon_enter_exit.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/mon_enter_exit.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/mon_enter_exit.cpp?view=diff&rev=518987&r1=518986&r2=518987
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/mon_enter_exit.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/mon_enter_exit.cpp Fri Mar 16 07:35:32 2007
@@ -84,14 +84,13 @@
     assert(cci);
     Method *method = cci->get_method();
 
+    assert(!hythread_is_suspend_enabled());
     if (method->is_synchronized()) {
-        bool unwindable = set_unwindable(false);
         if (method->is_static()) {
-            assert(!hythread_is_suspend_enabled());
             TRACE2("tm.locks", ("unlock static sync methods...%x",
                 struct_Class_to_java_lang_Class(method->get_class())));
-            vm_monitor_exit(struct_Class_to_java_lang_Class(method->
-                    get_class()));
+            IDATA UNREF status = vm_monitor_try_exit(
+                struct_Class_to_java_lang_Class(method->get_class()));
         }
         else {
             JIT *jit = cci->get_jit();
@@ -99,10 +98,8 @@
                 (void **) jit->get_address_of_this(method,
                 si_get_jit_context(si));
             TRACE2("tm.locks", ("unlock sync methods...%x" , *p_this));
-            vm_monitor_exit((ManagedObject *) * p_this);
+            IDATA UNREF status = vm_monitor_try_exit((ManagedObject *) * p_this);
         }
-        exn_clear();
-        set_unwindable(unwindable);
     }
 }