class FDSimpleRemoteEPCTransport

Declaration

class FDSimpleRemoteEPCTransport : public SimpleRemoteEPCTransport { /* full declaration omitted */ };

Description

Uses read/write on FileDescriptors for transport.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.h:102

Inherits from: SimpleRemoteEPCTransport

Member Variables

private std::mutex M
private llvm::orc::SimpleRemoteEPCTransportClient& C
private std::thread ListenerThread
private int InFD
private int OutFD
private std::atomic<bool> Disconnected = {false}

Method Overview

  • public static Expected<std::unique_ptr<FDSimpleRemoteEPCTransport>> Create(llvm::orc::SimpleRemoteEPCTransportClient & C, int InFD, int OutFD)
  • public static Expected<std::unique_ptr<FDSimpleRemoteEPCTransport>> Create(llvm::orc::SimpleRemoteEPCTransportClient & C, int FD)
  • private FDSimpleRemoteEPCTransport(llvm::orc::SimpleRemoteEPCTransportClient & C, int InFD, int OutFD)
  • public void disconnect()
  • private void listenLoop()
  • private llvm::Error readBytes(char * Dst, size_t Size, bool * IsEOF = nullptr)
  • public llvm::Error sendMessage(llvm::orc::SimpleRemoteEPCOpcode OpC, uint64_t SeqNo, llvm::orc::ExecutorAddr TagAddr, ArrayRef<char> ArgBytes)
  • public llvm::Error start()
  • private int writeBytes(const char * Src, size_t Size)
  • public ~FDSimpleRemoteEPCTransport()

Inherited from SimpleRemoteEPCTransport:

Methods

static Expected<
    std::unique_ptr<FDSimpleRemoteEPCTransport>>
Create(
    llvm::orc::SimpleRemoteEPCTransportClient& C,
    int InFD,
    int OutFD)

Description

Create a FDSimpleRemoteEPCTransport using the given FDs for reading (InFD) and writing (OutFD).

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.h:107

Parameters

llvm::orc::SimpleRemoteEPCTransportClient& C
int InFD
int OutFD

static Expected<
    std::unique_ptr<FDSimpleRemoteEPCTransport>>
Create(
    llvm::orc::SimpleRemoteEPCTransportClient& C,
    int FD)

Description

Create a FDSimpleRemoteEPCTransport using the given FD for both reading and writing.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.h:112

Parameters

llvm::orc::SimpleRemoteEPCTransportClient& C
int FD

FDSimpleRemoteEPCTransport(
    llvm::orc::SimpleRemoteEPCTransportClient& C,
    int InFD,
    int OutFD)

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.h:126

Parameters

llvm::orc::SimpleRemoteEPCTransportClient& C
int InFD
int OutFD

void disconnect()

Description

Trigger disconnection from the transport. The implementation should respond by calling handleDisconnect on the client once disconnection is complete. May be called more than once and from different threads.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.h:123

void listenLoop()

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.h:132

llvm::Error readBytes(char* Dst,
                      size_t Size,
                      bool* IsEOF = nullptr)

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.h:130

Parameters

char* Dst
size_t Size
bool* IsEOF = nullptr

llvm::Error sendMessage(
    llvm::orc::SimpleRemoteEPCOpcode OpC,
    uint64_t SeqNo,
    llvm::orc::ExecutorAddr TagAddr,
    ArrayRef<char> ArgBytes)

Description

Send a SimpleRemoteEPC message. This function may be called concurrently. Subclasses should implement locking if required for the underlying transport.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.h:120

Parameters

llvm::orc::SimpleRemoteEPCOpcode OpC
uint64_t SeqNo
llvm::orc::ExecutorAddr TagAddr
ArrayRef<char> ArgBytes

llvm::Error start()

Description

Called during setup of the client to indicate that the client is ready to receive messages. Transport objects should not access the client until this method is called.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.h:118

int writeBytes(const char* Src, size_t Size)

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.h:131

Parameters

const char* Src
size_t Size

~FDSimpleRemoteEPCTransport()

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.h:116