[Openmp-commits] [PATCH] D123446: [OpenMP][FIX] Remove shadow pointer map and introduce consistent locking

Ye Luo via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Apr 13 22:35:37 PDT 2022


ye-luo added a comment.

I'm afraid you are abusing existing mutex. Please be specific about what part of the Entry you are trying to protect with TPR lock/unlock.



================
Comment at: openmp/libomptarget/include/device.h:367
+    if (Entry && Lock)
+      Entry->lock();
+  }
----------------
  void lock() const { States->UpdateMtx.lock(); }
  void unlock() const { States->UpdateMtx.unlock(); }

the mutex is only intended to protect data transfer submission.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123446



More information about the Openmp-commits mailing list