changeset 277:f7e6d42d9323

6618886: Anonymous objects can be destructed immediately and so should not be used Reviewed-by: dholmes, kamg
author xlu
date Fri, 01 Aug 2008 15:18:14 -0700
parents 6f17a7c9f8b4
children 4fa67937726c 51ae48d8072f
files src/os/solaris/vm/osThread_solaris.cpp
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/os/solaris/vm/osThread_solaris.cpp	Fri Aug 01 15:12:34 2008 -0700
+++ b/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;