[Openmp-commits] [PATCH] D123444: [OpenMP][FIX] Simplify the entry deletion scheme

Ye Luo via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Apr 14 13:45:13 PDT 2022


ye-luo added inline comments.


================
Comment at: openmp/libomptarget/src/omptarget.cpp:866
       if (LR.Entry->getTotalRefCount() != 0 ||
-          LR.Entry->getDeleteThreadId() != std::this_thread::get_id()) {
+          LR.Entry->decDeleteCount() != 0) {
         // The thread is not in charge of deletion anymore. Give up access to
----------------
In another thread which is working on increase the refcount may have a race with the current thread deleting the entry because the other thread released HDTTMapAccessorTy and only have the entry locked.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123444



More information about the Openmp-commits mailing list