Lines Matching refs:curCount
247 int curCount = atomicStrong_.load(std::memory_order_relaxed);
248 if (curCount >= 0) {
249 curCount = atomicStrong_.fetch_add(1, std::memory_order_relaxed);
250 if (curCount == INITIAL_PRIMARY_VALUE) {
255 return curCount;
261 int curCount = GetStrongRefCount();
262 if (curCount == INITIAL_PRIMARY_VALUE) {
265 } else if (curCount > 0) {
268 curCount = atomicStrong_.fetch_sub(1, std::memory_order_release);
271 return curCount;
288 int curCount = GetWeakRefCount();
289 if (curCount > 0) {
290 curCount = atomicWeak_.fetch_sub(1, std::memory_order_release);
293 if (curCount != 1) {
294 return curCount;
314 return curCount;
354 int curCount = GetStrongRefCount();
358 while ((curCount > 0) && (curCount != INITIAL_PRIMARY_VALUE)) {
359 if (atomicStrong_.compare_exchange_weak(curCount, curCount + 1, std::memory_order_relaxed)) {
363 curCount = atomicStrong_.load(std::memory_order_relaxed);
366 if ((curCount == INITIAL_PRIMARY_VALUE) && !IsLifeTimeExtended()) {
368 while (curCount > 0) {
369 if (atomicStrong_.compare_exchange_weak(curCount, curCount + 1, std::memory_order_relaxed)) {
372 curCount = atomicStrong_.load(std::memory_order_relaxed);
382 curCount = atomicStrong_.fetch_add(1, std::memory_order_relaxed);
386 if (curCount == INITIAL_PRIMARY_VALUE) {
387 outCount = curCount;
392 if (curCount < 0 || (!IsLifeTimeExtended() && curCount == 0)) {
404 int curCount = GetStrongRefCount();
405 while (curCount > 0) {
406 if (atomicStrong_.compare_exchange_weak(curCount, curCount + 1, std::memory_order_relaxed)) {
409 // curCount has been updated.
411 if (curCount <= 0) {
414 return curCount > 0;
521 const int curCount = refs_->IncStrongRefCount(objectId);
522 if (!refs_->IsLifeTimeExtended() && curCount == 0) {
525 if (curCount == INITIAL_PRIMARY_VALUE) {
551 const int curCount = refs->DecStrongRefCount(objectId);
552 if (curCount <= 0) {
555 if (curCount == 1) {