< prev index next >

src/share/vm/utilities/bitMap.inline.hpp

Print this page
rev 13431 : imported patch remove_cmpxchg_ptr_users

*** 47,59 **** do { const bm_word_t new_val = old_val | mask; if (new_val == old_val) { return false; // Someone else beat us to it. } ! const bm_word_t cur_val = (bm_word_t) Atomic::cmpxchg_ptr((void*) new_val, ! (volatile void*) addr, ! (void*) old_val); if (cur_val == old_val) { return true; // Success. } old_val = cur_val; // The value changed, try again. } while (true); --- 47,57 ---- do { const bm_word_t new_val = old_val | mask; if (new_val == old_val) { return false; // Someone else beat us to it. } ! const bm_word_t cur_val = Atomic::cmpxchg(new_val, addr, old_val); if (cur_val == old_val) { return true; // Success. } old_val = cur_val; // The value changed, try again. } while (true);
*** 68,80 **** do { const bm_word_t new_val = old_val & mask; if (new_val == old_val) { return false; // Someone else beat us to it. } ! const bm_word_t cur_val = (bm_word_t) Atomic::cmpxchg_ptr((void*) new_val, ! (volatile void*) addr, ! (void*) old_val); if (cur_val == old_val) { return true; // Success. } old_val = cur_val; // The value changed, try again. } while (true); --- 66,76 ---- do { const bm_word_t new_val = old_val & mask; if (new_val == old_val) { return false; // Someone else beat us to it. } ! const bm_word_t cur_val = Atomic::cmpxchg(new_val, addr, old_val); if (cur_val == old_val) { return true; // Success. } old_val = cur_val; // The value changed, try again. } while (true);
< prev index next >