[libc-commits] [PATCH] D148288: [libc] Update RPC interface for system utilities on the GPU

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Apr 17 13:14:43 PDT 2023


jhuber6 marked 10 inline comments as done.
jhuber6 added inline comments.


================
Comment at: libc/src/__support/RPC/rpc.h:153-155
+  // We wait until we own the buffer before sending. We own the buffer if the
+  // input Ack bit is equal to the output Data bit.
+  while (bool(in & Process::Ack) != bool(out & Process::Data)) {
----------------
jdoerfert wrote:
> Complex logic, please put it into a helper with comment. Probably the entire while loop.
Since the other use is an if I think it's just helpful to put the logic to a named function. I think showing an explicit busy-wait is good.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148288



More information about the libc-commits mailing list