1//===-- Shared memory RPC client instantiation ------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_LIBC_SRC___SUPPORT_RPC_RPC_CLIENT_H
10#define LLVM_LIBC_SRC___SUPPORT_RPC_RPC_CLIENT_H
11
12#include "shared/rpc.h"
13#include "shared/rpc_opcodes.h"
14
15#include "src/__support/CPP/type_traits.h"
16#include "src/__support/macros/config.h"
17
18namespace LIBC_NAMESPACE_DECL {
19namespace rpc {
20
21using ::rpc::Buffer;
22using ::rpc::Client;
23using ::rpc::Port;
24using ::rpc::Process;
25using ::rpc::Server;
26
27static_assert(cpp::is_trivially_copyable<Client>::value &&
28 sizeof(Process<true>) == sizeof(Process<false>),
29 "The client is not trivially copyable from the server");
30
31/// The libc client instance used to communicate with the server.
32[[gnu::visibility("protected")]] extern Client client asm("__llvm_rpc_client");
33
34} // namespace rpc
35} // namespace LIBC_NAMESPACE_DECL
36
37#endif
38

Provided by KDAB

Privacy Policy
Improve your Profiling and Debugging skills
Find out more

source code of libc/src/__support/RPC/rpc_client.h