diff options
author | Mark Salyzyn <salyzyn@google.com> | 2014-09-29 22:26:44 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-09-29 22:26:44 +0000 |
commit | f25ce3cf605cb68d64657ef46611b720cf17bd7e (patch) | |
tree | bc12e64db4cf2fd07baa8f085c1a6799d533026e | |
parent | 3432fe1c371b4598b4abe215ca9aa44da2d68450 (diff) | |
parent | ed3b0f8c9da87fef400c12040044998be0582543 (diff) | |
download | system_core-f25ce3cf605cb68d64657ef46611b720cf17bd7e.zip system_core-f25ce3cf605cb68d64657ef46611b720cf17bd7e.tar.gz system_core-f25ce3cf605cb68d64657ef46611b720cf17bd7e.tar.bz2 |
am ed3b0f8c: am c4133a6e: am fc1357cf: Merge "logd: in nonblocking read, sched_yield() synchronization"
* commit 'ed3b0f8c9da87fef400c12040044998be0582543':
logd: in nonblocking read, sched_yield() synchronization
-rw-r--r-- | logd/LogReader.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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 LogReader::onDataAvailable(SocketClient *cli) { 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; } |