mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-14 17:57:43 +00:00
![Alp Toker](/assets/img/avatar_default.png)
The client and server now use a single unified low-level RPC core built around LLVM's existing cross-platform abstractions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199947 91177308-0d34-0410-b5e6-96231b3b80d8
52 lines
1.3 KiB
C++
52 lines
1.3 KiB
C++
//===---------- RPCChannel.h - LLVM out-of-process JIT execution ----------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Definition of the RemoteTargetExternal class which executes JITed code in a
|
|
// separate process from where it was built.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLI_RPCCHANNEL_H
|
|
#define LLI_RPCCHANNEL_H
|
|
|
|
#include <stdlib.h>
|
|
#include <string>
|
|
|
|
namespace llvm {
|
|
|
|
class RPCChannel {
|
|
public:
|
|
std::string ChildName;
|
|
|
|
RPCChannel() {}
|
|
~RPCChannel();
|
|
|
|
static void ReportError(int rc, size_t Size, std::string &ErrorMsg);
|
|
|
|
/// Start the remote process.
|
|
///
|
|
/// @returns True on success. On failure, ErrorMsg is updated with
|
|
/// descriptive text of the encountered error.
|
|
bool createServer();
|
|
|
|
bool createClient();
|
|
|
|
// This will get filled in as a point to an OS-specific structure.
|
|
void *ConnectionData;
|
|
|
|
int WriteBytes(const void *Data, size_t Size);
|
|
int ReadBytes(void *Data, size_t Size);
|
|
|
|
void Wait();
|
|
};
|
|
|
|
} // end namespace llvm
|
|
|
|
#endif // LLI_RPCCHANNEL_H
|