logd: update region lock after entry has passed to reader socket
(cherry pick from commit de4bb9c1a7)
- The reader region level indicates the location to protect, but once
it has been passed to the calling reader, then allow us to go
one beyond so that a clear or prune thread can remove the entry.
Bug: 23711431
Change-Id: I0f2389858dd8c83366c034360f67d7c363625b56
This commit is contained in:
parent
b04352e597
commit
70cbe025f4
1 changed files with 5 additions and 2 deletions
|
|
@ -128,9 +128,9 @@ void *LogTimeEntry::threadStart(void *obj) {
|
||||||
|
|
||||||
lock();
|
lock();
|
||||||
|
|
||||||
while (me->threadRunning && !me->isError_Locked()) {
|
uint64_t start = me->mStart;
|
||||||
uint64_t start = me->mStart;
|
|
||||||
|
|
||||||
|
while (me->threadRunning && !me->isError_Locked()) {
|
||||||
unlock();
|
unlock();
|
||||||
|
|
||||||
if (me->mTail) {
|
if (me->mTail) {
|
||||||
|
|
@ -143,8 +143,11 @@ void *LogTimeEntry::threadStart(void *obj) {
|
||||||
|
|
||||||
if (start == LogBufferElement::FLUSH_ERROR) {
|
if (start == LogBufferElement::FLUSH_ERROR) {
|
||||||
me->error_Locked();
|
me->error_Locked();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
me->mStart = start + 1;
|
||||||
|
|
||||||
if (me->mNonBlock || !me->threadRunning || me->isError_Locked()) {
|
if (me->mNonBlock || !me->threadRunning || me->isError_Locked()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue