[libc-commits] [PATCH] D154112: [libc] Fix the implementation of exit on the GPU

Jon Chesterfield via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Jun 29 10:33:07 PDT 2023


JonChesterfield added inline comments.


================
Comment at: libc/docs/gpu/support.rst:102
 strtoull       |check|
+strtoull       |check|
 =============  =========  ============
----------------
Copy paste error?


================
Comment at: libc/src/__support/OSUtil/gpu/quick_exit.cpp:21
   rpc::Client::Port port = rpc::client.open<RPC_EXIT>();
+  port.send_and_recv([](rpc::Buffer *) {}, [](rpc::Buffer *) {});
   port.send([&](rpc::Buffer *buffer) {
----------------
I expected the status to go in the first call but it probably doesn't matter. Maybe leave a comment in the client similar to the one in the server?


================
Comment at: libc/utils/gpu/server/rpc_server.cpp:106
+      // Send an empty response to sync with the client prior to exiting.
+      port->recv_and_send([](rpc::Buffer *) {});
       port->recv([](rpc::Buffer *buffer) {
----------------
Sync is a bit overloaded. The idea here is for the client to wait until it's sure something on the server is listening to it before it sends the exit code into the void?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154112/new/

https://reviews.llvm.org/D154112



More information about the libc-commits mailing list