diff options
| author | Oleksiy Vyalov <ovyalov@google.com> | 2015-01-13 23:19:40 +0000 |
|---|---|---|
| committer | Oleksiy Vyalov <ovyalov@google.com> | 2015-01-13 23:19:40 +0000 |
| commit | d5f8b6a6cadd054e42a7f0cdb1b4a16b8688cc61 (patch) | |
| tree | cde68a4d0c4923f6a30eb1d793d5e59a052a3348 /lldb/source/Host/common/PipeBase.cpp | |
| parent | 0a3bfdbd374941c053660dcdce20b778bfa5cafd (diff) | |
| download | bcm5719-llvm-d5f8b6a6cadd054e42a7f0cdb1b4a16b8688cc61.tar.gz bcm5719-llvm-d5f8b6a6cadd054e42a7f0cdb1b4a16b8688cc61.zip | |
Extend PipePosix with support for named pipes/timeout-based IO and integrate it with GDBRemoteCommunication / lldb-gdbserver.
http://reviews.llvm.org/D6954
llvm-svn: 225849
Diffstat (limited to 'lldb/source/Host/common/PipeBase.cpp')
| -rw-r--r-- | lldb/source/Host/common/PipeBase.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lldb/source/Host/common/PipeBase.cpp b/lldb/source/Host/common/PipeBase.cpp new file mode 100644 index 00000000000..3b1932c5419 --- /dev/null +++ b/lldb/source/Host/common/PipeBase.cpp @@ -0,0 +1,33 @@ +//===-- source/Host/common/PipeBase.cpp -------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Host/PipeBase.h" + +using namespace lldb_private; + + +PipeBase::~PipeBase() = default; + +Error +PipeBase::OpenAsReader(llvm::StringRef name, bool child_process_inherit) +{ + return OpenAsReaderWithTimeout(name, child_process_inherit, std::chrono::microseconds::zero()); +} + +Error +PipeBase::OpenAsWriter(llvm::StringRef name, bool child_process_inherit) +{ + return OpenAsWriterWithTimeout(name, child_process_inherit, std::chrono::microseconds::zero()); +} + +Error +PipeBase::Read(void *buf, size_t size, size_t &bytes_read) +{ + return ReadWithTimeout(buf, size, std::chrono::microseconds::zero(), bytes_read); +} |

