Lines Matching refs:refs
206 ref_entry* refs = mStrongRefs; in ~weakref_impl() local
207 while (refs) { in ~weakref_impl()
208 char inc = refs->ref >= 0 ? '+' : '-'; in ~weakref_impl()
209 ALOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref); in ~weakref_impl()
211 CallStack::logStack(LOG_TAG, refs->stack.get()); in ~weakref_impl()
213 refs = refs->next; in ~weakref_impl()
220 ref_entry* refs = mWeakRefs; in ~weakref_impl() local
221 while (refs) { in ~weakref_impl()
222 char inc = refs->ref >= 0 ? '+' : '-'; in ~weakref_impl()
223 ALOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref); in ~weakref_impl()
225 CallStack::logStack(LOG_TAG, refs->stack.get()); in ~weakref_impl()
227 refs = refs->next; in ~weakref_impl()
327 void addRef(ref_entry** refs, const void* id, int32_t mRef) in addRef() argument
341 ref->next = *refs; in addRef()
342 *refs = ref; in addRef()
346 void removeRef(ref_entry** refs, const void* id) in removeRef() argument
351 ref_entry* const head = *refs; in removeRef()
355 *refs = ref->next; in removeRef()
359 refs = &ref->next; in removeRef()
360 ref = *refs; in removeRef()
394 void printRefsLocked(String8* out, const ref_entry* refs) const in printRefsLocked()
397 while (refs) { in printRefsLocked()
398 char inc = refs->ref >= 0 ? '+' : '-'; in printRefsLocked()
400 inc, refs->id, refs->ref); in printRefsLocked()
403 out->append(CallStack::stackToString("\t\t", refs->stack.get())); in printRefsLocked()
407 refs = refs->next; in printRefsLocked()
427 weakref_impl* const refs = mRefs; in incStrong() local
428 refs->incWeak(id); in incStrong()
430 refs->addStrongRef(id); in incStrong()
431 const int32_t c = refs->mStrong.fetch_add(1, std::memory_order_relaxed); in incStrong()
432 ALOG_ASSERT(c > 0, "incStrong() called on %p after last strong ref", refs); in incStrong()
440 int32_t old __unused = refs->mStrong.fetch_sub(INITIAL_STRONG_VALUE, std::memory_order_relaxed); in incStrong()
443 refs->mBase->onFirstRef(); in incStrong()
447 weakref_impl* const refs = mRefs; in incStrongRequireStrong() local
448 refs->incWeak(id); in incStrongRequireStrong()
450 refs->addStrongRef(id); in incStrongRequireStrong()
451 const int32_t c = refs->mStrong.fetch_add(1, std::memory_order_relaxed); in incStrongRequireStrong()
454 "incStrongRequireStrong() called on %p which isn't already owned", refs); in incStrongRequireStrong()
462 weakref_impl* const refs = mRefs; in decStrong() local
463 refs->removeStrongRef(id); in decStrong()
464 const int32_t c = refs->mStrong.fetch_sub(1, std::memory_order_release); in decStrong()
469 refs); in decStrong()
472 refs->mBase->onLastStrongRef(id); in decStrong()
473 int32_t flags = refs->mFlags.load(std::memory_order_relaxed); in decStrong()
490 refs->decWeak(id); in decStrong()
497 weakref_impl* const refs = mRefs; in forceIncStrong() local
498 refs->incWeak(id); in forceIncStrong()
500 refs->addStrongRef(id); in forceIncStrong()
501 const int32_t c = refs->mStrong.fetch_add(1, std::memory_order_relaxed); in forceIncStrong()
503 refs); in forceIncStrong()
510 refs->mStrong.fetch_sub(INITIAL_STRONG_VALUE, in forceIncStrong()
514 refs->mBase->onFirstRef(); in forceIncStrong()