< prev index next >
src/hotspot/share/services/memoryManager.cpp
Print this page
rev 47404 : [mq]: load_ptr_acquire
rev 47406 : [mq]: assembler_cmpxchg
@@ -92,11 +92,11 @@
}
instanceOop MemoryManager::get_memory_manager_instance(TRAPS) {
// Must do an acquire so as to force ordering of subsequent
// loads from anything _memory_mgr_obj points to or implies.
- instanceOop mgr_obj = (instanceOop)OrderAccess::load_ptr_acquire(&_memory_mgr_obj);
+ instanceOop mgr_obj = OrderAccess::load_acquire(&_memory_mgr_obj);
if (mgr_obj == NULL) {
// It's ok for more than one thread to execute the code up to the locked region.
// Extra manager instances will just be gc'ed.
Klass* k = Management::sun_management_ManagementFactoryHelper_klass(CHECK_0);
@@ -145,11 +145,11 @@
// _memory_mgr_obj here because some other thread may have initialized
// it while we were executing the code before the lock.
//
// The lock has done an acquire, so the load can't float above it, but
// we need to do a load_acquire as above.
- mgr_obj = (instanceOop)OrderAccess::load_ptr_acquire(&_memory_mgr_obj);
+ mgr_obj = OrderAccess::load_acquire(&_memory_mgr_obj);
if (mgr_obj != NULL) {
return mgr_obj;
}
// Get the address of the object we created via call_special.
@@ -157,11 +157,11 @@
// Use store barrier to make sure the memory accesses associated
// with creating the management object are visible before publishing
// its address. The unlock will publish the store to _memory_mgr_obj
// because it does a release first.
- OrderAccess::release_store_ptr(&_memory_mgr_obj, mgr_obj);
+ OrderAccess::release_store(&_memory_mgr_obj, mgr_obj);
}
}
return mgr_obj;
}
< prev index next >