diff --git a/libc/src/__support/RPC/rpc.h b/libc/src/__support/RPC/rpc.h --- a/libc/src/__support/RPC/rpc.h +++ b/libc/src/__support/RPC/rpc.h @@ -43,12 +43,16 @@ /// server. The process contains an inbox and an outbox used for signaling /// ownership of the shared buffer. struct Process { + LIBC_INLINE Process(const Process &) = default; + LIBC_INLINE Process &operator=(const Process &) = default; + LIBC_INLINE ~Process() = default; + cpp::Atomic *inbox; cpp::Atomic *outbox; Buffer *buffer; /// Initialize the communication channels. - void reset(void *inbox, void *outbox, void *buffer) { + LIBC_INLINE void reset(void *inbox, void *outbox, void *buffer) { *this = { reinterpret_cast *>(inbox), reinterpret_cast *>(outbox), @@ -59,11 +63,19 @@ /// The RPC client used to make requests to the server. struct Client : public Process { + LIBC_INLINE Client(const Client &) = default; + LIBC_INLINE Client &operator=(const Client &) = default; + LIBC_INLINE ~Client() = default; + template void run(F fill, U use); }; /// The RPC server used to respond to the client. struct Server : public Process { + LIBC_INLINE Server(const Server &) = default; + LIBC_INLINE Server &operator=(const Server &) = default; + LIBC_INLINE ~Server() = default; + template bool handle(W work, C clean); };