[Openmp-commits] [PATCH] D131089: [Libomptarget] Explicitly init / deinit libomptarget from the user

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Aug 4 07:26:33 PDT 2022


tianshilei1992 added a comment.

I still think it's better for us to figure out if the lock here is necessary and document it explicitly.



================
Comment at: openmp/libomptarget/src/rtl.cpp:20
 #include <cassert>
+#include <condition_variable>
 #include <cstdlib>
----------------
leftover


================
Comment at: openmp/libomptarget/src/rtl.cpp:46
+void initLibomptarget() {
+  PluginMutex.lock();
+
----------------
lock guard will be better


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131089



More information about the Openmp-commits mailing list