summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/windows
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2016-11-25 14:43:37 +0000
committerPavel Labath <labath@google.com>2016-11-25 14:43:37 +0000
commitce8d6d9c6cec171f53ca45d776ad8e85538fbb99 (patch)
tree37a66485cc83d389596673ae159140cd26524c2f /lldb/source/Host/windows
parentc9379701758cc74d28f6a94e0e07292fed3a7ff6 (diff)
downloadbcm5719-llvm-ce8d6d9c6cec171f53ca45d776ad8e85538fbb99.tar.gz
bcm5719-llvm-ce8d6d9c6cec171f53ca45d776ad8e85538fbb99.zip
Fix builds Windows and OSX builds after Connection refactor in r287922
Switch various bits of platform-specific code to chrono that I did not notice when doing a linux build. This exposed a bug that ConnectionGenericFileWindows did not handle the magic UINT32_MAX timeout value (instead it waited for about an hour, which is close enough I guess). Fix that as well. llvm-svn: 287927
Diffstat (limited to 'lldb/source/Host/windows')
-rw-r--r--lldb/source/Host/windows/ConnectionGenericFileWindows.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp b/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp
index d13eb10c620..5d48a1c867a 100644
--- a/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp
+++ b/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp
@@ -168,7 +168,7 @@ lldb::ConnectionStatus ConnectionGenericFile::Disconnect(Error *error_ptr) {
}
size_t ConnectionGenericFile::Read(void *dst, size_t dst_len,
- uint32_t timeout_usec,
+ const Timeout<std::micro> &timeout,
lldb::ConnectionStatus &status,
Error *error_ptr) {
ReturnInfo return_info;
@@ -191,7 +191,11 @@ size_t ConnectionGenericFile::Read(void *dst, size_t dst_len,
// The expected return path. The operation is pending. Wait for the
// operation to complete
// or be interrupted.
- DWORD milliseconds = timeout_usec/1000;
+ DWORD milliseconds =
+ timeout
+ ? std::chrono::duration_cast<std::chrono::milliseconds>(*timeout)
+ .count()
+ : INFINITE;
DWORD wait_result =
::WaitForMultipleObjects(llvm::array_lengthof(m_event_handles),
m_event_handles, FALSE, milliseconds);
OpenPOWER on IntegriCloud