Lines Matching refs:curCount

437     int32_t curCount = impl->mStrong;  in attemptIncStrong()  local
439 ALOG_ASSERT(curCount >= 0, in attemptIncStrong()
442 while (curCount > 0 && curCount != INITIAL_STRONG_VALUE) { in attemptIncStrong()
445 if (android_atomic_cmpxchg(curCount, curCount+1, &impl->mStrong) == 0) { in attemptIncStrong()
450 curCount = impl->mStrong; in attemptIncStrong()
453 if (curCount <= 0 || curCount == INITIAL_STRONG_VALUE) { in attemptIncStrong()
460 if (curCount <= 0) { in attemptIncStrong()
470 while (curCount > 0) { in attemptIncStrong()
471 if (android_atomic_cmpxchg(curCount, curCount + 1, in attemptIncStrong()
477 curCount = impl->mStrong; in attemptIncStrong()
480 if (curCount <= 0) { in attemptIncStrong()
497 curCount = android_atomic_inc(&impl->mStrong); in attemptIncStrong()
505 if (curCount > 0 && curCount < INITIAL_STRONG_VALUE) { in attemptIncStrong()
513 ALOGD("attemptIncStrong of %p from %p: cnt=%d\n", this, id, curCount); in attemptIncStrong()
519 curCount = impl->mStrong; in attemptIncStrong()
520 while (curCount >= INITIAL_STRONG_VALUE) { in attemptIncStrong()
521 ALOG_ASSERT(curCount > INITIAL_STRONG_VALUE, in attemptIncStrong()
524 if (android_atomic_cmpxchg(curCount, curCount-INITIAL_STRONG_VALUE, in attemptIncStrong()
530 curCount = impl->mStrong; in attemptIncStrong()
540 int32_t curCount = impl->mWeak; in attemptIncWeak() local
541 ALOG_ASSERT(curCount >= 0, "attemptIncWeak called on %p after underflow", in attemptIncWeak()
543 while (curCount > 0) { in attemptIncWeak()
544 if (android_atomic_cmpxchg(curCount, curCount+1, &impl->mWeak) == 0) { in attemptIncWeak()
547 curCount = impl->mWeak; in attemptIncWeak()
550 if (curCount > 0) { in attemptIncWeak()
554 return curCount > 0; in attemptIncWeak()