< prev index next >
src/hotspot/share/gc/g1/g1CollectedHeap.cpp
Print this page
rev 47400 : [mq]: cmpxchg_ptr
*** 3496,3506 ****
void add_to_postponed_list(CompiledMethod* nm) {
CompiledMethod* old;
do {
old = (CompiledMethod*)_postponed_list;
nm->set_unloading_next(old);
! } while ((CompiledMethod*)Atomic::cmpxchg_ptr(nm, &_postponed_list, old) != old);
}
void clean_nmethod(CompiledMethod* nm) {
bool postponed = nm->do_unloading_parallel(_is_alive, _unloading_occurred);
--- 3496,3506 ----
void add_to_postponed_list(CompiledMethod* nm) {
CompiledMethod* old;
do {
old = (CompiledMethod*)_postponed_list;
nm->set_unloading_next(old);
! } while (Atomic::cmpxchg(nm, &_postponed_list, old) != old);
}
void clean_nmethod(CompiledMethod* nm) {
bool postponed = nm->do_unloading_parallel(_is_alive, _unloading_occurred);
*** 3539,3549 ****
claimed_nmethods[i] = last.method();
(*num_claimed_nmethods)++;
}
}
! } while ((CompiledMethod*)Atomic::cmpxchg_ptr(last.method(), &_claimed_nmethod, first) != first);
}
CompiledMethod* claim_postponed_nmethod() {
CompiledMethod* claim;
CompiledMethod* next;
--- 3539,3549 ----
claimed_nmethods[i] = last.method();
(*num_claimed_nmethods)++;
}
}
! } while (Atomic::cmpxchg(last.method(), &_claimed_nmethod, first) != first);
}
CompiledMethod* claim_postponed_nmethod() {
CompiledMethod* claim;
CompiledMethod* next;
*** 3554,3564 ****
return NULL;
}
next = claim->unloading_next();
! } while ((CompiledMethod*)Atomic::cmpxchg_ptr(next, &_postponed_list, claim) != claim);
return claim;
}
public:
--- 3554,3564 ----
return NULL;
}
next = claim->unloading_next();
! } while (Atomic::cmpxchg(next, &_postponed_list, claim) != claim);
return claim;
}
public:
< prev index next >