summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2016-02-09 22:32:41 +0000
committerJonathan Peyton <jonathan.l.peyton@intel.com>2016-02-09 22:32:41 +0000
commitd3f2b94d97789590c101ea7e512588deec80c288 (patch)
tree9b1f7094d9778072679030404cdc711b500b0694 /openmp/runtime/src
parent2fc1e3b154c8d506d12a9781cb8b592b468b5eb8 (diff)
downloadbcm5719-llvm-d3f2b94d97789590c101ea7e512588deec80c288.tar.gz
bcm5719-llvm-d3f2b94d97789590c101ea7e512588deec80c288.zip
Proxy task fix: task_state stack push condition on fork
The problem is that the master's thread state was not saved before entering a parallel region so it does not remember tasks when it returns. llvm-svn: 260306
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r--openmp/runtime/src/kmp_runtime.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openmp/runtime/src/kmp_runtime.c b/openmp/runtime/src/kmp_runtime.c
index 2f7d3e960c7..8801ed86b12 100644
--- a/openmp/runtime/src/kmp_runtime.c
+++ b/openmp/runtime/src/kmp_runtime.c
@@ -2093,7 +2093,8 @@ __kmp_fork_call(
KA_TRACE( 20, ( "__kmp_fork_call: Master T#%d pushing task_team %p / team %p, new task_team %p / team %p\n",
__kmp_gtid_from_thread( master_th ), master_th->th.th_task_team,
parent_team, team->t.t_task_team[master_th->th.th_task_state], team ) );
- if (level) {
+
+ if ( level || master_th->th.th_task_team ) {
// Take a memo of master's task_state
KMP_DEBUG_ASSERT(master_th->th.th_task_state_memo_stack);
if (master_th->th.th_task_state_top >= master_th->th.th_task_state_stack_sz) { // increase size
OpenPOWER on IntegriCloud