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

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Aug 4 06:41:19 PDT 2022


jhuber6 updated this revision to Diff 449957.
jhuber6 added a comment.

Adding a condition variable to ensure that we do not return from the initialization function until we have a valid pointer.

Also making the register requires function also initialize the runtime so it can use the pointer, but it does not increment the user count so we still know how many to deallocate. This is a somewhat hacky solution, I'm wondering in the long-term if it would be better to use the same mechanism we use to register global entires for these flags.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131089

Files:
  openmp/libomptarget/include/device.h
  openmp/libomptarget/src/interface.cpp
  openmp/libomptarget/src/omptarget.cpp
  openmp/libomptarget/src/rtl.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131089.449957.patch
Type: text/x-patch
Size: 3799 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220804/caf94dba/attachment.bin>


More information about the Openmp-commits mailing list