Home | History | Annotate | Download | only in libutils

Lines Matching refs:curCount

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