[Openmp-commits] [PATCH] D117627: [OpenMP] Introduce an environment variable to disable atomic map clauses

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 18 17:37:55 PST 2022


jdoerfert marked an inline comment as done.
jdoerfert added inline comments.


================
Comment at: openmp/libomptarget/src/device.cpp:23
 
+int HostDataToTargetTy::addEventIfNecessaryAndUnlock(
+    DeviceTy &Device, AsyncInfoTy &AsyncInfo) const {
----------------
tianshilei1992 wrote:
> This is arguably not a good practice to handle locks. We have `Entry->lock()` in one place and then nothing. For sure the function name `addEventIfNecessaryAndUnlock` contains "unlock", but it's still too vague because locks are usually used by pair or guarded by scope. Although I agree the code looks more neat, I don't think it's worth to do it in exchange of ambiguity.
done


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117627



More information about the Openmp-commits mailing list