[Openmp-commits] [openmp] r356933 - [OpenMP] Fix pause check with version info
Jonathan Peyton via Openmp-commits
openmp-commits at lists.llvm.org
Mon Mar 25 11:17:56 PDT 2019
Author: jlpeyton
Date: Mon Mar 25 11:17:55 2019
New Revision: 356933
URL: http://llvm.org/viewvc/llvm-project?rev=356933&view=rev
Log:
[OpenMP] Fix pause check with version info
Add 5.0 guard to pause code for now.
Patch by Terry Wilmarth
Differential Revision: https://reviews.llvm.org/D59428
Modified:
openmp/trunk/runtime/src/kmp_runtime.cpp
Modified: openmp/trunk/runtime/src/kmp_runtime.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_runtime.cpp?rev=356933&r1=356932&r2=356933&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_runtime.cpp (original)
+++ openmp/trunk/runtime/src/kmp_runtime.cpp Mon Mar 25 11:17:55 2019
@@ -6320,15 +6320,12 @@ void __kmp_internal_end_thread(int gtid_
}
}
#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;
}
More information about the Openmp-commits
mailing list