summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectThread.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-05-09 14:29:30 +0000
committerPavel Labath <labath@google.com>2018-05-09 14:29:30 +0000
commit3879fe0099c62d2afa67048e41f0426daea688ae (patch)
treefd3aa4f3085bba40040eab691764242fc0c0397f /lldb/source/Commands/CommandObjectThread.cpp
parente253f2f886a980c227a35508601bd0a6a5aba5c6 (diff)
downloadbcm5719-llvm-3879fe0099c62d2afa67048e41f0426daea688ae.tar.gz
bcm5719-llvm-3879fe0099c62d2afa67048e41f0426daea688ae.zip
Modernize and clean-up the Predicate class
Summary: The comments on this class were out of date with the implementation, and the implementation itself was inconsistent with our usage of the Timeout class (I started converting everything to use this class back in D27136, but I missed this one). I avoid duplicating the waiting logic by introducing a templated WaitFor function, and make other functions delegate to that. This function can be also used as a replacement for the unused WaitForBitToBeSet functions I removed, if it turns out to be necessary. As this changes the meaning of a "zero" timeout, I tracked down all the callers of these functions and updated them accordingly. Propagating the changes to all the callers of RunShellCommand was a bit too much for this patch, so I stopped there and will continue that in a follow-up patch. I also add some basic unittests for the functions I modified. Reviewers: jingham, clayborg Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D46580 llvm-svn: 331880
Diffstat (limited to 'lldb/source/Commands/CommandObjectThread.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectThread.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp
index a9a277e7841..7ea908eb8ae 100644
--- a/lldb/source/Commands/CommandObjectThread.cpp
+++ b/lldb/source/Commands/CommandObjectThread.cpp
@@ -786,7 +786,7 @@ protected:
// stack to the main command handler and show an (lldb) prompt before
// HandlePrivateEvent (from PrivateStateThread) has a chance to call
// PushProcessIOHandler().
- process->SyncIOHandler(iohandler_id, 2000);
+ process->SyncIOHandler(iohandler_id, std::chrono::seconds(2));
if (synchronous_execution) {
// If any state changed events had anything to say, add that to the
OpenPOWER on IntegriCloud