[Openmp-commits] [openmp] r372887 - fixed test: eliminated race condition which might cause deadlock

Andrey Churbanov via Openmp-commits openmp-commits at lists.llvm.org
Wed Sep 25 08:25:52 PDT 2019


Author: achurbanov
Date: Wed Sep 25 08:25:52 2019
New Revision: 372887

URL: http://llvm.org/viewvc/llvm-project?rev=372887&view=rev
Log:
fixed test: eliminated race condition which might cause deadlock

Modified:
    openmp/trunk/runtime/test/tasking/omp_fill_taskqueue.c

Modified: openmp/trunk/runtime/test/tasking/omp_fill_taskqueue.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/tasking/omp_fill_taskqueue.c?rev=372887&r1=372886&r2=372887&view=diff
==============================================================================
--- openmp/trunk/runtime/test/tasking/omp_fill_taskqueue.c (original)
+++ openmp/trunk/runtime/test/tasking/omp_fill_taskqueue.c Wed Sep 25 08:25:52 2019
@@ -29,7 +29,6 @@ int main()
 {
   int i;
   int block = 1;
-  int tid;
   int throttling = strcmp(getenv("KMP_ENABLE_TASK_THROTTLING"), "1") == 0;
   int enqueued = 0;
   int failed = -1;
@@ -41,6 +40,7 @@ int main()
       enqueued++;
       #pragma omp task
       {
+        int tid;
         tid = omp_get_thread_num();
         if (tid == 0) {
           // As soon as the master thread starts executing task we should unlock




More information about the Openmp-commits mailing list