mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-25 06:40:18 +00:00
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
This commit is contained in:
parent
fa160c7386
commit
057d77d8c1
@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user