Lines Matching refs:curCount
416 int32_t curCount = impl->mStrong; in attemptIncStrong() local
417 LOG_ASSERT(curCount >= 0, "attemptIncStrong called on %p after underflow", in attemptIncStrong()
419 while (curCount > 0 && curCount != INITIAL_STRONG_VALUE) { in attemptIncStrong()
420 if (android_atomic_cmpxchg(curCount, curCount+1, &impl->mStrong) == 0) { in attemptIncStrong()
423 curCount = impl->mStrong; in attemptIncStrong()
426 if (curCount <= 0 || curCount == INITIAL_STRONG_VALUE) { in attemptIncStrong()
428 if (curCount == INITIAL_STRONG_VALUE) { in attemptIncStrong()
447 curCount = android_atomic_inc(&impl->mStrong); in attemptIncStrong()
454 if (curCount > 0 && curCount < INITIAL_STRONG_VALUE) { in attemptIncStrong()
463 LOGD("attemptIncStrong of %p from %p: cnt=%d\n", this, id, curCount); in attemptIncStrong()
466 if (curCount == INITIAL_STRONG_VALUE) { in attemptIncStrong()
478 int32_t curCount = impl->mWeak; in attemptIncWeak() local
479 LOG_ASSERT(curCount >= 0, "attemptIncWeak called on %p after underflow", in attemptIncWeak()
481 while (curCount > 0) { in attemptIncWeak()
482 if (android_atomic_cmpxchg(curCount, curCount+1, &impl->mWeak) == 0) { in attemptIncWeak()
485 curCount = impl->mWeak; in attemptIncWeak()
488 if (curCount > 0) { in attemptIncWeak()
492 return curCount > 0; in attemptIncWeak()