[libc-commits] [PATCH] D149897: [libc][rpc] Update locking to work on volta

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu May 4 14:11:47 PDT 2023


jhuber6 accepted this revision.
jhuber6 added a comment.
This revision is now accepted and ready to land.

Logic is harder to understand, but is probably more correct.



================
Comment at: libc/src/__support/RPC/rpc.h:158
+    uint32_t and_mask = ~(rpc::is_first_lane(lane_mask) ? 1 : 0);
+    lock[index].fetch_and(and_mask, cpp::MemoryOrder::RELAXED);
   }
----------------
We might need another lane sync here. I'll test when I put the parallelism back in.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149897



More information about the libc-commits mailing list