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

Noah Goldstein via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Apr 13 20:28:04 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: libc/src/__support/RPC/rpc.h:237
+  uint32_t open = 0;
+  if (!lock->compare_exchange_strong(open, 1))
+    return cpp::nullopt;
----------------
given that is only two states, exchange is enough, no need for CAS.

Likewise below.


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