8317235: Remove Access API use in nmethod class

Backport-of: c47a0ce3f0
This commit is contained in:
Goetz Lindenmaier
2024-04-03 09:40:16 +00:00
committed by Vitaly Provodin
parent 6ce2cff3fd
commit 456c4570fe

View File

@@ -1700,7 +1700,7 @@ public:
};
bool nmethod::is_unloading() {
uint8_t state = RawAccess<MO_RELAXED>::load(&_is_unloading_state);
uint8_t state = Atomic::load(&_is_unloading_state);
bool state_is_unloading = IsUnloadingState::is_unloading(state);
if (state_is_unloading) {
return true;
@@ -1736,7 +1736,7 @@ bool nmethod::is_unloading() {
void nmethod::clear_unloading_state() {
uint8_t state = IsUnloadingState::create(false, CodeCache::unloading_cycle());
RawAccess<MO_RELAXED>::store(&_is_unloading_state, state);
Atomic::store(&_is_unloading_state, state);
}