< prev index next >
src/hotspot/share/gc/z/zRelocationSet.inline.hpp
Print this page
*** 36,46 ****
inline bool ZRelocationSetIteratorImpl<parallel>::next(ZForwarding** forwarding) {
const size_t nforwardings = _relocation_set->_nforwardings;
if (parallel) {
if (_next < nforwardings) {
! const size_t next = Atomic::add(1u, &_next) - 1u;
if (next < nforwardings) {
*forwarding = _relocation_set->_forwardings[next];
return true;
}
}
--- 36,46 ----
inline bool ZRelocationSetIteratorImpl<parallel>::next(ZForwarding** forwarding) {
const size_t nforwardings = _relocation_set->_nforwardings;
if (parallel) {
if (_next < nforwardings) {
! const size_t next = Atomic::add(&_next, 1u) - 1u;
if (next < nforwardings) {
*forwarding = _relocation_set->_forwardings[next];
return true;
}
}
< prev index next >