[libc-commits] [PATCH] D147054: [libc] Begin implementing a library for the RPC server
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Jun 6 00:20:16 PDT 2023
sivachandra added a comment.
Answering the question from discord: Normally, a single header file named `<some>_service.h` is to be used by both the client and the server. Client's will use the client API from that header file, where as servers will use the server API. That way, the message types (or opcodes as you are calling) will be in a single shared header file.
================
Comment at: libc/utils/gpu/server/Server.h:46
+/// A function used to allocate \p size bytes.
+typedef void *(rpc_alloc_ty)(uint64_t size, void *data);
+
----------------
Why are there separate functions allocation and deallocation?
================
Comment at: libc/utils/gpu/server/Server.h:51
+
+/// A function used to free a \ptr.
+typedef void(rpc_opcode_callback_ty)(port_t port, void *data);
----------------
Update comment.
================
Comment at: libc/utils/gpu/server/Server.h:54
+
+/// A function used to free a \ptr.
+typedef void(rpc_port_callback_ty)(buffer_t *buffer, void *data);
----------------
Ditto.
================
Comment at: libc/utils/gpu/server/Server.h:61
+/// Shut down the rpc library.
+rpc_status_t rpc_deinit();
+
----------------
Why not just `rpc_shutdown`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147054/new/
https://reviews.llvm.org/D147054
More information about the libc-commits
mailing list