< prev index next >

src/hotspot/share/oops/symbol.cpp

Print this page

        

*** 279,289 **** if (refc == PERM_REFCOUNT) { return true; // sticky max or created permanent } else if (refc == 0) { return false; // dead, can't revive. } else { ! found = Atomic::cmpxchg(old_value + 1, &_length_and_refcount, old_value); if (found == old_value) { return true; // successfully updated. } // refcount changed, try again. } --- 279,289 ---- if (refc == PERM_REFCOUNT) { return true; // sticky max or created permanent } else if (refc == 0) { return false; // dead, can't revive. } else { ! found = Atomic::cmpxchg(&_length_and_refcount, old_value, old_value + 1); if (found == old_value) { return true; // successfully updated. } // refcount changed, try again. }
*** 322,332 **** print(); fatal("refcount underflow"); #endif return; } else { ! found = Atomic::cmpxchg(old_value - 1, &_length_and_refcount, old_value); if (found == old_value) { return; // successfully updated. } // refcount changed, try again. } --- 322,332 ---- print(); fatal("refcount underflow"); #endif return; } else { ! found = Atomic::cmpxchg(&_length_and_refcount, old_value, old_value - 1); if (found == old_value) { return; // successfully updated. } // refcount changed, try again. }
*** 346,356 **** fatal("refcount underflow"); #endif return; } else { int len = extract_length(old_value); ! found = Atomic::cmpxchg(pack_length_and_refcount(len, PERM_REFCOUNT), &_length_and_refcount, old_value); if (found == old_value) { return; // successfully updated. } // refcount changed, try again. } --- 346,356 ---- fatal("refcount underflow"); #endif return; } else { int len = extract_length(old_value); ! found = Atomic::cmpxchg(&_length_and_refcount, old_value, pack_length_and_refcount(len, PERM_REFCOUNT)); if (found == old_value) { return; // successfully updated. } // refcount changed, try again. }
< prev index next >