mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8188220: Remove Atomic::*_ptr() uses and overloads from hotspot
With the new template functions these are unnecessary. Reviewed-by: kbarrett, dholmes, eosterlund
This commit is contained in:
parent
cb9e7bf51a
commit
39b068db11
83 changed files with 376 additions and 458 deletions
|
@ -94,7 +94,7 @@ GCMemoryManager* MemoryManager::get_g1OldGen_memory_manager() {
|
|||
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.
|
||||
|
@ -147,7 +147,7 @@ instanceOop MemoryManager::get_memory_manager_instance(TRAPS) {
|
|||
//
|
||||
// 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;
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ instanceOop MemoryManager::get_memory_manager_instance(TRAPS) {
|
|||
// 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue