Lines Matching refs:refs

108             ref_entry* refs = mStrongRefs;
109 while (refs) {
110 char inc = refs->ref >= 0 ? '+' : '-';
111 ALOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref);
113 refs->stack.dump(LOG_TAG);
115 refs = refs->next;
122 ref_entry* refs = mWeakRefs;
123 while (refs) {
124 char inc = refs->ref >= 0 ? '+' : '-';
125 ALOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref);
127 refs->stack.dump(LOG_TAG);
129 refs = refs->next;
223 void addRef(ref_entry** refs, const void* id, int32_t mRef)
237 ref->next = *refs;
238 *refs = ref;
242 void removeRef(ref_entry** refs, const void* id)
247 ref_entry* const head = *refs;
251 *refs = ref->next;
255 refs = &ref->next;
256 ref = *refs;
288 void printRefsLocked(String8* out, const ref_entry* refs) const
291 while (refs) {
292 char inc = refs->ref >= 0 ? '+' : '-';
294 inc, refs->id, refs->ref);
297 out->append(refs->stack.toString("\t\t"));
301 refs = refs->next;
321 weakref_impl* const refs = mRefs;
322 refs->incWeak(id);
324 refs->addStrongRef(id);
325 const int32_t c = android_atomic_inc(&refs->mStrong);
326 ALOG_ASSERT(c > 0, "incStrong() called on %p after last strong ref", refs);
334 android_atomic_add(-INITIAL_STRONG_VALUE, &refs->mStrong);
335 refs->mBase->onFirstRef();
340 weakref_impl* const refs = mRefs;
341 refs->removeStrongRef(id);
342 const int32_t c = android_atomic_dec(&refs->mStrong);
346 ALOG_ASSERT(c >= 1, "decStrong() called on %p too many times", refs);
348 refs->mBase->onLastStrongRef(id);
349 if ((refs->mFlags&OBJECT_LIFETIME_MASK) == OBJECT_LIFETIME_STRONG) {
353 refs->decWeak(id);
358 weakref_impl* const refs = mRefs;
359 refs->incWeak(id);
361 refs->addStrongRef(id);
362 const int32_t c = android_atomic_inc(&refs->mStrong);
364 refs);
371 android_atomic_add(-INITIAL_STRONG_VALUE, &refs->mStrong);
374 refs->mBase->onFirstRef();
415 // ALOGV("Freeing refs %p of old RefBase %p\n", this, impl->mBase);