[Openmp-commits] [PATCH] D48932: [OMPT] Add synchronization to threads_nested.c testcase

Phabricator via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jul 5 02:19:04 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL336326: [OMPT] Add synchronization to threads_nested.c testcase (authored by jprotze, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D48932?vs=154093&id=154189#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D48932

Files:
  openmp/trunk/runtime/test/ompt/misc/threads_nested.c


Index: openmp/trunk/runtime/test/ompt/misc/threads_nested.c
===================================================================
--- openmp/trunk/runtime/test/ompt/misc/threads_nested.c
+++ openmp/trunk/runtime/test/ompt/misc/threads_nested.c
@@ -4,14 +4,16 @@
 #include <omp.h>
 
 int main() {
+
+  int condition = 0;
   int x = 0;
   omp_set_nested(1);
 #pragma omp parallel num_threads(2)
   {
 #pragma omp parallel num_threads(2)
     {
-#pragma omp atomic
-      x++;
+      OMPT_SIGNAL(condition);
+      OMPT_WAIT(condition, 4);
     }
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48932.154189.patch
Type: text/x-patch
Size: 549 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180705/57a67d79/attachment.bin>


More information about the Openmp-commits mailing list