From 9b8bb323c94768ae788d77fc597f057d97b9eb17 Mon Sep 17 00:00:00 2001 From: Jonathan Peyton Date: Wed, 16 Jan 2019 20:07:39 +0000 Subject: [OpenMP] Add omp_pause_resource* API Add omp_pause_resource and omp_pause_resource_all API and enum, plus stub for internal implementation. Implemented callable helper function to do local pause, and added basic functionality for hard and soft pause. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D55078 llvm-svn: 351372 --- openmp/runtime/src/kmp_dispatch_hier.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'openmp/runtime/src/kmp_dispatch_hier.h') diff --git a/openmp/runtime/src/kmp_dispatch_hier.h b/openmp/runtime/src/kmp_dispatch_hier.h index 8277eaa5a04..48b164e88b2 100644 --- a/openmp/runtime/src/kmp_dispatch_hier.h +++ b/openmp/runtime/src/kmp_dispatch_hier.h @@ -924,6 +924,10 @@ void __kmp_dispatch_init_hierarchy(ident_t *loc, int n, KMP_DEBUG_ASSERT(new_chunks); if (!TCR_4(__kmp_init_parallel)) __kmp_parallel_initialize(); +#if OMP_50_ENABLED + __kmp_resume_if_soft_paused(); +#endif + th = __kmp_threads[gtid]; team = th->th.th_team; active = !team->t.t_serialized; -- cgit v1.2.3