[Openmp-commits] [PATCH] D59428: Fix pause check with version info

Terry Wilmarth via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Mar 15 12:38:50 PDT 2019


tlwilmar created this revision.
tlwilmar added reviewers: AndreyChurbanov, hbae, jlpeyton.
tlwilmar added a project: OpenMP.
Herald added a subscriber: jdoerfert.

Add 5.0 guard to pause code.  For now anyhow.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D59428

Files:
  runtime/src/kmp_runtime.cpp
  runtime/src/kmp_taskq.cpp


Index: runtime/src/kmp_runtime.cpp
===================================================================
--- runtime/src/kmp_runtime.cpp
+++ runtime/src/kmp_runtime.cpp
@@ -6320,15 +6320,12 @@
     }
   }
 #if KMP_DYNAMIC_LIB
-  // AC: lets not shutdown the Linux* OS dynamic library at the exit of uber
-  // thread, because we will better shutdown later in the library destructor.
-  // The reason of this change is performance problem when non-openmp thread in
-  // a loop forks and joins many openmp threads. We can save a lot of time
-  // keeping worker threads alive until the program shutdown.
-  // OM: Removed Linux* OS restriction to fix the crash on OS X* (DPD200239966)
-  // and Windows(DPD200287443) that occurs when using critical sections from
-  // foreign threads.
-  if (__kmp_pause_status != kmp_hard_paused) {
+#if OMP_50_ENABLED
+  if (__kmp_pause_status != kmp_hard_paused)
+#endif
+  // AC: lets not shutdown the dynamic library at the exit of uber thread,
+  // because we will better shutdown later in the library destructor.
+  {
     KA_TRACE(10, ("__kmp_internal_end_thread: exiting T#%d\n", gtid_req));
     return;
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59428.190878.patch
Type: text/x-patch
Size: 1151 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20190315/cd6bfa83/attachment.bin>


More information about the Openmp-commits mailing list