summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/kmp_csupport.c
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/runtime/src/kmp_csupport.c')
-rw-r--r--openmp/runtime/src/kmp_csupport.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_csupport.c b/openmp/runtime/src/kmp_csupport.c
index 6f782edcf82..23bb37ceef0 100644
--- a/openmp/runtime/src/kmp_csupport.c
+++ b/openmp/runtime/src/kmp_csupport.c
@@ -461,6 +461,14 @@ __kmpc_end_serialized_parallel(ident_t *loc, kmp_int32 global_tid)
this_thr = __kmp_threads[ global_tid ];
serial_team = this_thr->th.th_serial_team;
+ #if OMP_41_ENABLED
+ kmp_task_team_t * task_team = this_thr->th.th_task_team;
+
+ // we need to wait for the proxy tasks before finishing the thread
+ if ( task_team != NULL && task_team->tt.tt_found_proxy_tasks )
+ __kmp_task_team_wait(this_thr, serial_team, NULL ); // is an ITT object needed here?
+ #endif
+
KMP_MB();
KMP_DEBUG_ASSERT( serial_team );
KMP_ASSERT( serial_team -> t.t_serialized );
OpenPOWER on IntegriCloud