[Openmp-commits] [PATCH] D112874: [OpenMP][FIX] Avoid a race between initialization and first state reads

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Oct 31 10:16:29 PDT 2021


jdoerfert added inline comments.


================
Comment at: openmp/libomptarget/DeviceRTL/include/Mapping.h:43
+/// races between the initialization and the first read of initialized state.
+bool isInitializationThread(bool IsSPMD);
+
----------------
jdoerfert wrote:
> tianshilei1992 wrote:
> > nit: in OpenMP term, it is "initial thread".
> But in generic mode the initial thread, or main thread (thread 0), changes between parallel level 0 and 1. we used to use the one for level 1, now the one for level 0. As this is really asking "should I use this thread for initialization" and not "is this the initial thread (in some unspecified level)" I think the name fits.
I'm rewording.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112874



More information about the Openmp-commits mailing list