[libc-commits] [PATCH] D149788: [libc][rpc] Simplify mailbox state tracking
Joseph Huber via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed May 3 15:09:04 PDT 2023
jhuber6 added inline comments.
================
Comment at: libc/src/__support/OSUtil/gpu/io.cpp:18
void write_to_stderr(cpp::string_view msg) {
- rpc::Port port = rpc::client.open(rpc::PRINT_TO_STDERR);
+ rpc::Client::Port port = rpc::client.open(rpc::PRINT_TO_STDERR);
port.send_n(msg.data(), msg.size());
----------------
I guess since this is a templated type now we can't just have a generic port? Also what happened to the one in `Server.h`.
================
Comment at: libc/src/__support/RPC/rpc.h:96
+ /// Determines if this process owns the buffer for a send.
LIBC_INLINE static bool can_send_data(uint32_t in, uint32_t out) {
+ return in == out;
----------------
Can probably just call this `can_use_buffer` and get rid of the other one. I think keeping `send` and `recv` separate is more readable however.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149788/new/
https://reviews.llvm.org/D149788
More information about the libc-commits
mailing list