[OpenMP] Insert missing variable update inside loop
authorJonathan Peyton <jonathan.l.peyton@intel.com>
Mon, 22 May 2023 19:08:51 +0000 (14:08 -0500)
committerJonathan Peyton <jonathan.l.peyton@intel.com>
Tue, 23 May 2023 14:19:04 +0000 (09:19 -0500)
commitd67c91b5e728d94376873c04ffac3ba6d29b95b8
tree85383c7b90eb01824a58dd6ce5ac5bd0f3cd4368
parenta0c92a3817efec51403f3129f2f6578d7625c2ce
[OpenMP] Insert missing variable update inside loop

While loop within task priority code did not have necessary update of
variable which could lead to hangs if two threads collided when both
attempted to execute the compare_and_exchange.

Fixes: https://github.com/llvm/llvm-project/issues/62867
Differential Revision: https://reviews.llvm.org/D151138
openmp/runtime/src/kmp_tasking.cpp
openmp/runtime/test/tasking/omp_task_priority3.c [new file with mode: 0644]