[Openmp-commits] [openmp] [Libomptarget] Remove global ctor and use reference counting (PR #80499)
Joseph Huber via Openmp-commits
openmp-commits at lists.llvm.org
Tue Feb 6 08:41:43 PST 2024
================
@@ -20,25 +20,37 @@
extern void llvm::omp::target::ompt::connectLibrary();
#endif
-__attribute__((constructor(101))) void init() {
+static std::mutex PluginMtx;
+static std::atomic<uint32_t> RefCount = 0;
----------------
jhuber6 wrote:
Thought that myself, was erring on the side of caution in case someone somewhere wants to read it, but likely a non-issue.
https://github.com/llvm/llvm-project/pull/80499
More information about the Openmp-commits
mailing list