Lines Matching refs:second
105 } else if (iter->second.find(value) == iter->second.end()) { in insert()
106 iter->second.insert(value); in insert()
117 if (iter->second.erase(value) > 0) { in erase()
120 if (iter->second.size() == 0) { in erase()
131 auto setIter = iter->second.find(value); in contains()
132 return setIter != iter->second.end(); in contains()
226 if (found->second->mSenderValidated && in fetch()
227 found->second->mStatus == BufferStatus::TRANSFER_FROM && in fetch()
228 found->second->mBufferId == bufferId) { in fetch()
229 found->second->mStatus = BufferStatus::TRANSFER_FETCH; in fetch()
233 *handle = bufferIt->second->handle(); in fetch()
266 const sp<IObserver> observer = it->second; in handleInvalidateAck()
333 if (isMessageLater(msgId, it->second)) { in onAck()
393 if (it->second != mInvalidationId) { in onHandleAck()
398 (long long)it->first, it->second, mInvalidationId); in onHandleAck()
401 it->second = mInvalidationId; in onHandleAck()
426 iter->second->mOwnerCount++; in handleOwnBuffer()
437 iter->second->mOwnerCount--; in handleReleaseBuffer()
438 if (iter->second->mOwnerCount == 0 && in handleReleaseBuffer()
439 iter->second->mTransactionCount == 0) { in handleReleaseBuffer()
440 if (!iter->second->mInvalidated) { in handleReleaseBuffer()
441 mStats.onBufferUnused(iter->second->mAllocSize); in handleReleaseBuffer()
444 mStats.onBufferUnused(iter->second->mAllocSize); in handleReleaseBuffer()
445 mStats.onBufferEvicted(iter->second->mAllocSize); in handleReleaseBuffer()
473 found->second->mSender = message.connectionId; in handleTransferTo()
474 found->second->mSenderValidated = true; in handleTransferTo()
484 bufferIter->second->mTransactionCount++; in handleTransferTo()
499 bufferIter->second->mTransactionCount++; in handleTransferFrom()
501 if (message.connectionId == found->second->mReceiver) { in handleTransferFrom()
502 found->second->mStatus = BufferStatus::TRANSFER_FROM; in handleTransferFrom()
514 if (!found->second->mSenderValidated) { in handleTransferResult()
521 bufferIter->second->mTransactionCount--; in handleTransferResult()
522 if (bufferIter->second->mOwnerCount == 0 in handleTransferResult()
523 && bufferIter->second->mTransactionCount == 0) { in handleTransferResult()
524 if (!bufferIter->second->mInvalidated) { in handleTransferResult()
525 mStats.onBufferUnused(bufferIter->second->mAllocSize); in handleTransferResult()
528 mStats.onBufferUnused(bufferIter->second->mAllocSize); in handleTransferResult()
529 mStats.onBufferEvicted(bufferIter->second->mAllocSize); in handleTransferResult()
595 for (const BufferId& bufferId : buffers->second) { in handleClose()
599 bufferIter->second->mOwnerCount--; in handleClose()
600 if (bufferIter->second->mOwnerCount == 0 && in handleClose()
601 bufferIter->second->mTransactionCount == 0) { in handleClose()
603 if (!bufferIter->second->mInvalidated) { in handleClose()
604 mStats.onBufferUnused(bufferIter->second->mAllocSize); in handleClose()
607 mStats.onBufferUnused(bufferIter->second->mAllocSize); in handleClose()
608 mStats.onBufferEvicted(bufferIter->second->mAllocSize); in handleClose()
621 for (const TransactionId& transactionId : pending->second) { in handleClose()
624 if (!iter->second->mSenderValidated) { in handleClose()
627 BufferId bufferId = iter->second->mBufferId; in handleClose()
629 bufferIter->second->mTransactionCount--; in handleClose()
630 if (bufferIter->second->mOwnerCount == 0 && in handleClose()
631 bufferIter->second->mTransactionCount == 0) { in handleClose()
633 if (!bufferIter->second->mInvalidated) { in handleClose()
634 mStats.onBufferUnused(bufferIter->second->mAllocSize); in handleClose()
637 mStats.onBufferUnused(bufferIter->second->mAllocSize); in handleClose()
638 mStats.onBufferEvicted(bufferIter->second->mAllocSize); in handleClose()
690 if (res.second) { in addNewBuffer()
720 it->second->mOwnerCount == 0 && it->second->mTransactionCount == 0) { in cleanUp()
721 mStats.onBufferEvicted(it->second->mAllocSize); in cleanUp()
739 it->second->mOwnerCount == 0 && it->second->mTransactionCount == 0) { in invalidate()
740 mStats.onBufferEvicted(it->second->mAllocSize); in invalidate()
754 it->second->invalidate(); in invalidate()
788 const std::shared_ptr<Accessor::Impl> impl = it->second.lock(); in invalidatorThread()