commit | fc1357cffbbe999c8d4065b89ce0435f35243a82 | [log] [tgz] |
---|---|---|
author | Mark Salyzyn <salyzyn@google.com> | Mon Sep 29 17:41:11 2014 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Mon Sep 29 17:41:11 2014 +0000 |
tree | ddb806912d2abdb7b526cae9fb7cedf1fec93623 | |
parent | 68c19686e8f9b5a88e3b2729a453d03516be79f1 [diff] | |
parent | f669acb01880216b6c1d29fc226f2c3ec3a6368a [diff] |
Merge "logd: in nonblocking read, sched_yield() synchronization"
diff --git a/logd/LogReader.cpp b/logd/LogReader.cpp index 8458c19..26df087 100644 --- a/logd/LogReader.cpp +++ b/logd/LogReader.cpp
@@ -92,6 +92,11 @@ bool nonBlock = false; if (strncmp(buffer, "dumpAndClose", 12) == 0) { + // Allow writer to get some cycles, and wait for pending notifications + sched_yield(); + LogTimeEntry::lock(); + LogTimeEntry::unlock(); + sched_yield(); nonBlock = true; }