Lines Matching refs:refs
172 ref_entry* refs = mStrongRefs; in ~weakref_impl() local
173 while (refs) { in ~weakref_impl()
174 char inc = refs->ref >= 0 ? '+' : '-'; in ~weakref_impl()
175 ALOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref); in ~weakref_impl()
177 refs->stack.log(LOG_TAG); in ~weakref_impl()
179 refs = refs->next; in ~weakref_impl()
186 ref_entry* refs = mWeakRefs; in ~weakref_impl() local
187 while (refs) { in ~weakref_impl()
188 char inc = refs->ref >= 0 ? '+' : '-'; in ~weakref_impl()
189 ALOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref); in ~weakref_impl()
191 refs->stack.log(LOG_TAG); in ~weakref_impl()
193 refs = refs->next; in ~weakref_impl()
287 void addRef(ref_entry** refs, const void* id, int32_t mRef) in addRef() argument
301 ref->next = *refs; in addRef()
302 *refs = ref; in addRef()
306 void removeRef(ref_entry** refs, const void* id) in removeRef() argument
311 ref_entry* const head = *refs; in removeRef()
315 *refs = ref->next; in removeRef()
319 refs = &ref->next; in removeRef()
320 ref = *refs; in removeRef()
352 void printRefsLocked(String8* out, const ref_entry* refs) const in printRefsLocked()
355 while (refs) { in printRefsLocked()
356 char inc = refs->ref >= 0 ? '+' : '-'; in printRefsLocked()
358 inc, refs->id, refs->ref); in printRefsLocked()
361 out->append(refs->stack.toString("\t\t")); in printRefsLocked()
365 refs = refs->next; in printRefsLocked()
385 weakref_impl* const refs = mRefs; in incStrong() local
386 refs->incWeak(id); in incStrong()
388 refs->addStrongRef(id); in incStrong()
389 const int32_t c = refs->mStrong.fetch_add(1, std::memory_order_relaxed); in incStrong()
390 ALOG_ASSERT(c > 0, "incStrong() called on %p after last strong ref", refs); in incStrong()
398 int32_t old = refs->mStrong.fetch_sub(INITIAL_STRONG_VALUE, in incStrong()
402 refs->mBase->onFirstRef(); in incStrong()
407 weakref_impl* const refs = mRefs; in decStrong() local
408 refs->removeStrongRef(id); in decStrong()
409 const int32_t c = refs->mStrong.fetch_sub(1, std::memory_order_release); in decStrong()
413 ALOG_ASSERT(c >= 1, "decStrong() called on %p too many times", refs); in decStrong()
416 refs->mBase->onLastStrongRef(id); in decStrong()
417 int32_t flags = refs->mFlags.load(std::memory_order_relaxed); in decStrong()
430 refs->decWeak(id); in decStrong()
437 weakref_impl* const refs = mRefs; in forceIncStrong() local
438 refs->incWeak(id); in forceIncStrong()
440 refs->addStrongRef(id); in forceIncStrong()
441 const int32_t c = refs->mStrong.fetch_add(1, std::memory_order_relaxed); in forceIncStrong()
443 refs); in forceIncStrong()
450 refs->mStrong.fetch_sub(INITIAL_STRONG_VALUE, in forceIncStrong()
454 refs->mBase->onFirstRef(); in forceIncStrong()