src/hotspot/share/gc/z/zRelocationSet.inline.hpp
changeset 59249 29b0d0b61615
parent 54163 790679f86a51
equal deleted inserted replaced
59248:e92153ed8bdc 59249:29b0d0b61615
    36 inline bool ZRelocationSetIteratorImpl<parallel>::next(ZForwarding** forwarding) {
    36 inline bool ZRelocationSetIteratorImpl<parallel>::next(ZForwarding** forwarding) {
    37   const size_t nforwardings = _relocation_set->_nforwardings;
    37   const size_t nforwardings = _relocation_set->_nforwardings;
    38 
    38 
    39   if (parallel) {
    39   if (parallel) {
    40     if (_next < nforwardings) {
    40     if (_next < nforwardings) {
    41       const size_t next = Atomic::add(1u, &_next) - 1u;
    41       const size_t next = Atomic::add(&_next, 1u) - 1u;
    42       if (next < nforwardings) {
    42       if (next < nforwardings) {
    43         *forwarding = _relocation_set->_forwardings[next];
    43         *forwarding = _relocation_set->_forwardings[next];
    44         return true;
    44         return true;
    45       }
    45       }
    46     }
    46     }