Changeset View
Changeset View
Standalone View
Standalone View
openmp/trunk/runtime/src/kmp_runtime.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 3,980 Lines • ▼ Show 20 Lines | __kmp_unregister_root_current_thread( int gtid ) | ||||
KMP_MB(); | KMP_MB(); | ||||
#if OMP_41_ENABLED | #if OMP_41_ENABLED | ||||
kmp_info_t * thread = __kmp_threads[gtid]; | kmp_info_t * thread = __kmp_threads[gtid]; | ||||
kmp_team_t * team = thread->th.th_team; | kmp_team_t * team = thread->th.th_team; | ||||
kmp_task_team_t * task_team = thread->th.th_task_team; | kmp_task_team_t * task_team = thread->th.th_task_team; | ||||
// we need to wait for the proxy tasks before finishing the thread | // we need to wait for the proxy tasks before finishing the thread | ||||
if ( task_team != NULL && task_team->tt.tt_found_proxy_tasks ) | if ( task_team != NULL && task_team->tt.tt_found_proxy_tasks ) { | ||||
#if OMPT_SUPPORT | |||||
// the runtime is shutting down so we won't report any events | |||||
thread->th.ompt_thread_info.state = ompt_state_undefined; | |||||
#endif | |||||
__kmp_task_team_wait(thread, team, NULL ); | __kmp_task_team_wait(thread, team, NULL ); | ||||
} | |||||
#endif | #endif | ||||
__kmp_reset_root(gtid, root); | __kmp_reset_root(gtid, root); | ||||
/* free up this thread slot */ | /* free up this thread slot */ | ||||
__kmp_gtid_set_specific( KMP_GTID_DNE ); | __kmp_gtid_set_specific( KMP_GTID_DNE ); | ||||
#ifdef KMP_TDATA_GTID | #ifdef KMP_TDATA_GTID | ||||
__kmp_gtid = KMP_GTID_DNE; | __kmp_gtid = KMP_GTID_DNE; | ||||
▲ Show 20 Lines • Show All 3,706 Lines • Show Last 20 Lines |