[PATCH] D125979: [ADT] add LockFreeDataPool class.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 21 14:46:56 PDT 2022


MaskRay added inline comments.


================
Comment at: llvm/include/llvm/ADT/LockFreeDataPool.h:113
+  Slab *getNextSlab(Slab *CurSlab, AllocatorTy &Allocator) {
+    if (CurSlab->NextSlab == nullptr) {
+      const std::lock_guard<std::mutex> lock(SlabsMutex);
----------------
relaxed load on NextSlab and save it into a local variable.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125979



More information about the llvm-commits mailing list