summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2015-05-21 17:20:01 +0000
committerJonathan Peyton <jonathan.l.peyton@intel.com>2015-05-21 17:20:01 +0000
commit057d77d8c16598ae696610f8ace9d66602424349 (patch)
tree2805b0884cd1a82e7784896f9126493d0653f957
parentfa160c7386561dd1f0d2868792aa981ed13774ec (diff)
downloadbcm5719-llvm-057d77d8c16598ae696610f8ace9d66602424349.tar.gz
bcm5719-llvm-057d77d8c16598ae696610f8ace9d66602424349.zip
Fix task team synchronization
The fix simply syncs up the new threads to have the same task_state and task_team as the old threads. The master thread is skipped, because it shouldn't at this point have the team's task_team value yet -- it should still have parent_team's task_team. It gets pointed at the new team's task_team later, after __kmp_allocate_team returns, and the master has stored a memo of it's old task_state. llvm-svn: 237916
-rw-r--r--openmp/runtime/src/kmp_runtime.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_runtime.c b/openmp/runtime/src/kmp_runtime.c
index 3fdbf075838..4ab998ba1e0 100644
--- a/openmp/runtime/src/kmp_runtime.c
+++ b/openmp/runtime/src/kmp_runtime.c
@@ -5060,6 +5060,7 @@ __kmp_allocate_team( kmp_root_t *root, int new_nproc, int max_nproc,
for (f=0; f < team->t.t_nproc; ++f) {
__kmp_initialize_info( team->t.t_threads[ f ], team, f, __kmp_gtid_from_tid( f, team ) );
team->t.t_threads[f]->th.th_task_state = old_state;
+ team->t.t_threads[f]->th.th_task_team = team->t.t_task_team[old_state];
}
}
OpenPOWER on IntegriCloud