From d5f8b6a6cadd054e42a7f0cdb1b4a16b8688cc61 Mon Sep 17 00:00:00 2001 From: Oleksiy Vyalov Date: Tue, 13 Jan 2015 23:19:40 +0000 Subject: 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 --- lldb/source/Host/common/PipeBase.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 lldb/source/Host/common/PipeBase.cpp (limited to 'lldb/source/Host/common/PipeBase.cpp') 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); +} -- cgit v1.2.3