equal
deleted
inserted
replaced
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 } |