mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "Decrement size of pending write queue by correct amount" am: 79fc8d0212 am: b492ac69b5 am: 0cf13f7ded
Change-Id: I555d97575c9f4780bc4edcd46ba4cad0b2ff64ef
This commit is contained in:
@@ -486,15 +486,14 @@ void HalProxy::handlePendingWrites() {
|
||||
}
|
||||
}
|
||||
lock.lock();
|
||||
mSizePendingWriteEventsQueue -= numToWrite;
|
||||
if (pendingWriteEvents.size() > eventQueueSize) {
|
||||
// TODO(b/143302327): Check if this erase operation is too inefficient. It will copy
|
||||
// all the events ahead of it down to fill gap off array at front after the erase.
|
||||
pendingWriteEvents.erase(pendingWriteEvents.begin(),
|
||||
pendingWriteEvents.begin() + eventQueueSize);
|
||||
mSizePendingWriteEventsQueue -= eventQueueSize;
|
||||
} else {
|
||||
mPendingWriteEventsQueue.pop();
|
||||
mSizePendingWriteEventsQueue -= pendingWriteEvents.size();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user