src/hotspot/share/gc/z/zResurrection.inline.hpp
changeset 59253 1647ed87bf1e
parent 50525 767cdb97f103
equal deleted inserted replaced
59252:623722a6aeb9 59253:1647ed87bf1e
    23 
    23 
    24 #ifndef SHARE_GC_Z_ZRESURRECTION_INLINE_HPP
    24 #ifndef SHARE_GC_Z_ZRESURRECTION_INLINE_HPP
    25 #define SHARE_GC_Z_ZRESURRECTION_INLINE_HPP
    25 #define SHARE_GC_Z_ZRESURRECTION_INLINE_HPP
    26 
    26 
    27 #include "gc/z/zResurrection.hpp"
    27 #include "gc/z/zResurrection.hpp"
    28 #include "runtime/orderAccess.hpp"
    28 #include "runtime/atomic.hpp"
    29 
    29 
    30 inline bool ZResurrection::is_blocked() {
    30 inline bool ZResurrection::is_blocked() {
    31   // We use a loadload barrier to make sure we are not
    31   return Atomic::load(&_blocked);
    32   // seeing oops from a time when resurrection was blocked.
       
    33   const bool blocked = _blocked;
       
    34   OrderAccess::loadload();
       
    35   return blocked;
       
    36 }
    32 }
    37 
    33 
    38 #endif // SHARE_GC_Z_ZRESURRECTION_INLINE_HPP
    34 #endif // SHARE_GC_Z_ZRESURRECTION_INLINE_HPP