[Openmp-commits] [PATCH] D136952: [libomptarget] Fix a race condition in checkDeviceAndCtors

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Oct 28 14:36:35 PDT 2022


tianshilei1992 added a comment.

In D136952#3893157 <https://reviews.llvm.org/D136952#3893157>, @jhuber6 wrote:

> In D136952#3893155 <https://reviews.llvm.org/D136952#3893155>, @tianshilei1992 wrote:
>
>> Once per device?
>
> It just means that we'd need an array of `std::once_flags` for each device. It's not a huge barrier but not sure if it's that much more convenient.

Yeah, that what I mean. I generally think `std::once_flags` is cleaner than this method. I'm fine using `PendingGlobalsMtx` here as we can't get rid of it anyway.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136952



More information about the Openmp-commits mailing list