hotspot/src/os/solaris/vm/osThread_solaris.cpp
changeset 982 e2a8e2e6051a
parent 1 489c9b5090e2
child 1217 5eb97f366a6a
--- a/hotspot/src/os/solaris/vm/osThread_solaris.cpp	Fri Aug 01 15:12:34 2008 -0700
+++ b/hotspot/src/os/solaris/vm/osThread_solaris.cpp	Fri Aug 01 15:18:14 2008 -0700
@@ -69,15 +69,15 @@
 static intptr_t compare_and_exchange_current_callback (
        intptr_t callback, intptr_t *addr, intptr_t compare_value, Mutex *sync) {
   if (VM_Version::supports_compare_and_exchange()) {
-     return Atomic::cmpxchg_ptr(callback, addr, compare_value);
+    return Atomic::cmpxchg_ptr(callback, addr, compare_value);
   } else {
-     MutexLockerEx(sync, Mutex::_no_safepoint_check_flag);
-     if (*addr == compare_value) {
-       *addr = callback;
-       return compare_value;
-     } else {
-       return callback;
-     }
+    MutexLockerEx ml(sync, Mutex::_no_safepoint_check_flag);
+    if (*addr == compare_value) {
+      *addr = callback;
+      return compare_value;
+    } else {
+      return callback;
+    }
   }
 }
 
@@ -86,7 +86,7 @@
   if (VM_Version::supports_compare_and_exchange()) {
     return Atomic::xchg_ptr(callback, addr);
   } else {
-    MutexLockerEx(sync, Mutex::_no_safepoint_check_flag);
+    MutexLockerEx ml(sync, Mutex::_no_safepoint_check_flag);
     intptr_t cb = *addr;
     *addr = callback;
     return cb;