[libc-commits] [libc] [libc] Export the RPC interface from `libc` (PR #71432)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Thu Nov 9 14:10:16 PST 2023


================
@@ -17,9 +17,12 @@ namespace LIBC_NAMESPACE {
 static_assert(sizeof(rpc_port_t) == sizeof(rpc::Client::Port), "ABI mismatch");
 static_assert(sizeof(rpc_buffer_t) == sizeof(rpc::Buffer), "ABI mismatch");
 
-LLVM_LIBC_FUNCTION(void, rpc_recv, (rpc_port_t * handle)) {
+LLVM_LIBC_FUNCTION(void, rpc_recv,
+                   (rpc_port_t * handle, rpc_callback_t callback, void *data)) {
----------------
jhuber6 wrote:

The `rpc_port_t` is more or less a type-erased buffer. We convert it back to the real type since we know what it is internally. To the user, it's just like 32 bytes.

https://github.com/llvm/llvm-project/pull/71432


More information about the libc-commits mailing list