John Harrison 1a7b7e24bc
[lldb] Adding pipe support to lldb_private::MainLoopWindows. (#145621)
This updates MainLoopWindows to support events for reading from a pipe
(both anonymous and named pipes) as well as sockets.

This unifies both handle types using `WSAWaitForMultipleEvents` which
can listen to both sockets and handles for change events.

This should allow us to unify how we handle watching pipes/sockets on
Windows and Posix systems.

We can extend this in the future if we want to support watching other
types, like files or even other events like a process life time.

---------

Co-authored-by: Pavel Labath <pavel@labath.sk>
2025-07-01 08:59:27 -07:00

24 lines
714 B
C++

//===-- IOObject.cpp ------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "lldb/Utility/IOObject.h"
#ifdef _WIN32
#include "lldb/Host/windows/windows.h"
#endif
using namespace lldb_private;
#ifdef _WIN32
const IOObject::WaitableHandle IOObject::kInvalidHandleValue =
INVALID_HANDLE_VALUE;
#else
const IOObject::WaitableHandle IOObject::kInvalidHandleValue = -1;
#endif
IOObject::~IOObject() = default;