diff options
Diffstat (limited to 'openmp/runtime/src/kmp_barrier.cpp')
-rw-r--r-- | openmp/runtime/src/kmp_barrier.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/openmp/runtime/src/kmp_barrier.cpp b/openmp/runtime/src/kmp_barrier.cpp index fb7e67ef602..0c67b7f392d 100644 --- a/openmp/runtime/src/kmp_barrier.cpp +++ b/openmp/runtime/src/kmp_barrier.cpp @@ -1153,7 +1153,7 @@ __kmp_barrier(enum barrier_type bt, int gtid, int is_split, size_t reduce_size, if (__kmp_tasking_mode != tskm_immediate_exec) { __kmp_task_team_wait(this_thr, team USE_ITT_BUILD_ARG(itt_sync_obj) ); - __kmp_task_team_setup(this_thr, team, 0, 0); // use 0,0 to only setup the current team if nthreads > 1 + __kmp_task_team_setup(this_thr, team, 0); // use 0 to only setup the current team if nthreads > 1 } #if USE_DEBUGGER // Let the debugger know: All threads are arrived and starting leaving the barrier. @@ -1261,7 +1261,7 @@ __kmp_barrier(enum barrier_type bt, int gtid, int is_split, size_t reduce_size, KMP_DEBUG_ASSERT(this_thr->th.th_task_team->tt.tt_found_proxy_tasks == TRUE); __kmp_task_team_wait(this_thr, team USE_ITT_BUILD_ARG(itt_sync_obj)); - __kmp_task_team_setup(this_thr, team, 0, 0); + __kmp_task_team_setup(this_thr, team, 0); #if USE_ITT_BUILD if (__itt_sync_create_ptr || KMP_ITT_DEBUG) @@ -1575,7 +1575,7 @@ __kmp_fork_barrier(int gtid, int tid) #endif if (__kmp_tasking_mode != tskm_immediate_exec) { - __kmp_task_team_setup(this_thr, team, 1, 0); // 1,0 indicates setup both task teams if nthreads > 1 + __kmp_task_team_setup(this_thr, team, 0); // 0 indicates setup current task team if nthreads > 1 } /* The master thread may have changed its blocktime between the join barrier and the @@ -1614,14 +1614,7 @@ __kmp_fork_barrier(int gtid, int tid) // Early exit for reaping threads releasing forkjoin barrier if (TCR_4(__kmp_global.g.g_done)) { - if (this_thr->th.th_task_team != NULL) { - if (KMP_MASTER_TID(tid)) { - TCW_PTR(this_thr->th.th_task_team, NULL); - } - else { - __kmp_unref_task_team(this_thr->th.th_task_team, this_thr); - } - } + this_thr->th.th_task_team = NULL; #if USE_ITT_BUILD && USE_ITT_NOTIFY if (__itt_sync_create_ptr || KMP_ITT_DEBUG) { |