Aggressive optimization might translate
while(block);
to
while(tid!=0);
The atomic read/write adds the necessary flushes, so that the worker threads will finally see the update.
Differential D81804
[OpenMP][Tests] fix data race in a OpenMP runtime test protze.joachim on Jun 14 2020, 6:51 AM. Authored by
Details Aggressive optimization might translate while(block); to while(tid!=0); The atomic read/write adds the necessary flushes, so that the worker threads will finally see the update.
Diff Detail
|