summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2015-03-12 10:12:41 +0000
committerPavel Labath <labath@google.com>2015-03-12 10:12:41 +0000
commit3f5df53fdef2593662cca8d274566e761cb8a91d (patch)
tree4bcdab7f1e1013996c221845de4f680459faf490 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
parent9425b329c8f72b3ea6b5fdb771e4a339afcd5e10 (diff)
downloadbcm5719-llvm-3f5df53fdef2593662cca8d274566e761cb8a91d.tar.gz
bcm5719-llvm-3f5df53fdef2593662cca8d274566e761cb8a91d.zip
Fix ProcessIO test failures
Summary: There was a race condition regarding the output of the inferior process. The reading of the output is performed on a separate thread, and there was no guarantee that the output will get eventually consumed. Because of that, it was happening that calling Process::GetSTDOUT was not returning anything even though the process was terminated and would definitely not produce any further output. This was usually happening only under very heavy system load, but it can be reproduced by placing an usleep in the stdio thread (Process::STDIOReadThreadBytesReceived). This patch addresses this by adding synchronization capabilities to the Communication thread. After calling Communication::SynchronizeWithReadThread one can be sure that all pending input has been processed by the read thread. This function is then called after every public event which stops the process to obtain the entire process output. Test Plan: TestProcessIO.py should now succeed every time instead of flaking in and out. Reviewers: clayborg, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8246 llvm-svn: 232023
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud