Lines Matching refs:refs
195 ref_entry* refs = mStrongRefs; in ~weakref_impl() local
196 while (refs) { in ~weakref_impl()
197 char inc = refs->ref >= 0 ? '+' : '-'; in ~weakref_impl()
198 ALOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref); in ~weakref_impl()
200 CallStack::logStack(LOG_TAG, refs->stack.get()); in ~weakref_impl()
202 refs = refs->next; in ~weakref_impl()
209 ref_entry* refs = mWeakRefs; in ~weakref_impl() local
210 while (refs) { in ~weakref_impl()
211 char inc = refs->ref >= 0 ? '+' : '-'; in ~weakref_impl()
212 ALOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref); in ~weakref_impl()
214 CallStack::logStack(LOG_TAG, refs->stack.get()); in ~weakref_impl()
216 refs = refs->next; in ~weakref_impl()
315 void addRef(ref_entry** refs, const void* id, int32_t mRef) in addRef() argument
329 ref->next = *refs; in addRef()
330 *refs = ref; in addRef()
334 void removeRef(ref_entry** refs, const void* id) in removeRef() argument
339 ref_entry* const head = *refs; in removeRef()
343 *refs = ref->next; in removeRef()
347 refs = &ref->next; in removeRef()
348 ref = *refs; in removeRef()
380 void printRefsLocked(String8* out, const ref_entry* refs) const in printRefsLocked()
383 while (refs) { in printRefsLocked()
384 char inc = refs->ref >= 0 ? '+' : '-'; in printRefsLocked()
386 inc, refs->id, refs->ref); in printRefsLocked()
389 out->append(CallStack::stackToString("\t\t", refs->stack.get())); in printRefsLocked()
393 refs = refs->next; in printRefsLocked()
413 weakref_impl* const refs = mRefs; in incStrong() local
414 refs->incWeak(id); in incStrong()
416 refs->addStrongRef(id); in incStrong()
417 const int32_t c = refs->mStrong.fetch_add(1, std::memory_order_relaxed); in incStrong()
418 ALOG_ASSERT(c > 0, "incStrong() called on %p after last strong ref", refs); in incStrong()
426 int32_t old __unused = refs->mStrong.fetch_sub(INITIAL_STRONG_VALUE, std::memory_order_relaxed); in incStrong()
429 refs->mBase->onFirstRef(); in incStrong()
434 weakref_impl* const refs = mRefs; in decStrong() local
435 refs->removeStrongRef(id); in decStrong()
436 const int32_t c = refs->mStrong.fetch_sub(1, std::memory_order_release); in decStrong()
441 refs); in decStrong()
444 refs->mBase->onLastStrongRef(id); in decStrong()
445 int32_t flags = refs->mFlags.load(std::memory_order_relaxed); in decStrong()
462 refs->decWeak(id); in decStrong()
469 weakref_impl* const refs = mRefs; in forceIncStrong() local
470 refs->incWeak(id); in forceIncStrong()
472 refs->addStrongRef(id); in forceIncStrong()
473 const int32_t c = refs->mStrong.fetch_add(1, std::memory_order_relaxed); in forceIncStrong()
475 refs); in forceIncStrong()
482 refs->mStrong.fetch_sub(INITIAL_STRONG_VALUE, in forceIncStrong()
486 refs->mBase->onFirstRef(); in forceIncStrong()