< prev index next >
src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.cpp
Print this page
*** 144,154 ****
jint saved_current = _current_index;
size_t index = (size_t)saved_current;
while(index < num_regions) {
if (is_in(index)) {
! jint cur = Atomic::cmpxchg((jint)(index + 1), &_current_index, saved_current);
assert(cur >= (jint)saved_current, "Must move forward");
if (cur == saved_current) {
assert(is_in(index), "Invariant");
return _heap->get_region(index);
} else {
--- 144,154 ----
jint saved_current = _current_index;
size_t index = (size_t)saved_current;
while(index < num_regions) {
if (is_in(index)) {
! jint cur = Atomic::cmpxchg(&_current_index, saved_current, (jint)(index + 1));
assert(cur >= (jint)saved_current, "Must move forward");
if (cur == saved_current) {
assert(is_in(index), "Invariant");
return _heap->get_region(index);
} else {
< prev index next >