diff --git a/logd/LogTimes.cpp b/logd/LogTimes.cpp index a4b96d33d..2a04880e4 100644 --- a/logd/LogTimes.cpp +++ b/logd/LogTimes.cpp @@ -90,7 +90,7 @@ void LogTimeEntry::threadStop(void *obj) { while(it != times.end()) { if (*it == me) { times.erase(it); - me->release_Locked(); + me->release_nodelete_Locked(); break; } it++; diff --git a/logd/LogTimes.h b/logd/LogTimes.h index f5969df35..b66ff9e59 100644 --- a/logd/LogTimes.h +++ b/logd/LogTimes.h @@ -75,7 +75,13 @@ public: void triggerSkip_Locked(log_id_t id, unsigned int skip) { skipAhead[id] = skip; } void cleanSkip_Locked(void); - // Called after LogTimeEntry removed from list, lock implicitly held + // These called after LogTimeEntry removed from list, lock implicitly held + void release_nodelete_Locked(void) { + mRelease = true; + pthread_cond_signal(&threadTriggeredCondition); + // assumes caller code path will call decRef_Locked() + } + void release_Locked(void) { mRelease = true; pthread_cond_signal(&threadTriggeredCondition);