diff options
Diffstat (limited to 'openmp/runtime/src/kmp_runtime.cpp')
-rw-r--r-- | openmp/runtime/src/kmp_runtime.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/openmp/runtime/src/kmp_runtime.cpp b/openmp/runtime/src/kmp_runtime.cpp index 44f54ad9c2f..369aff9eddb 100644 --- a/openmp/runtime/src/kmp_runtime.cpp +++ b/openmp/runtime/src/kmp_runtime.cpp @@ -6320,15 +6320,12 @@ void __kmp_internal_end_thread(int gtid_req) { } } #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; } |