< prev index next >

src/hotspot/share/gc/shared/parallelCleaning.cpp

Print this page

        

*** 92,102 **** claimed_nmethods[i] = last.method(); (*num_claimed_nmethods)++; } } ! } while (Atomic::cmpxchg(last.method(), &_claimed_nmethod, first) != first); } void CodeCacheUnloadingTask::work(uint worker_id) { // The first nmethods is claimed by the first worker. if (worker_id == 0 && _first_nmethod != NULL) { --- 92,102 ---- claimed_nmethods[i] = last.method(); (*num_claimed_nmethods)++; } } ! } while (Atomic::cmpxchg(&_claimed_nmethod, first, last.method()) != first); } void CodeCacheUnloadingTask::work(uint worker_id) { // The first nmethods is claimed by the first worker. if (worker_id == 0 && _first_nmethod != NULL) {
*** 128,138 **** bool KlassCleaningTask::claim_clean_klass_tree_task() { if (_clean_klass_tree_claimed) { return false; } ! return Atomic::cmpxchg(1, &_clean_klass_tree_claimed, 0) == 0; } InstanceKlass* KlassCleaningTask::claim_next_klass() { Klass* klass; do { --- 128,138 ---- bool KlassCleaningTask::claim_clean_klass_tree_task() { if (_clean_klass_tree_claimed) { return false; } ! return Atomic::cmpxchg(&_clean_klass_tree_claimed, 0, 1) == 0; } InstanceKlass* KlassCleaningTask::claim_next_klass() { Klass* klass; do {
< prev index next >