diff --git a/openmp/runtime/src/kmp_runtime.cpp b/openmp/runtime/src/kmp_runtime.cpp --- a/openmp/runtime/src/kmp_runtime.cpp +++ b/openmp/runtime/src/kmp_runtime.cpp @@ -3985,12 +3985,6 @@ __kmp_reset_root(gtid, root); - /* free up this thread slot */ - __kmp_gtid_set_specific(KMP_GTID_DNE); -#ifdef KMP_TDATA_GTID - __kmp_gtid = KMP_GTID_DNE; -#endif - KMP_MB(); KC_TRACE(10, ("__kmp_unregister_root_current_thread: T#%d unregistered\n", gtid)); @@ -5828,20 +5822,6 @@ /* NOTE: the gtid is stored as gitd+1 in the thread-local-storage * this is because 0 is reserved for the nothing-stored case */ - /* josh: One reason for setting the gtid specific data even when it is being - destroyed by pthread is to allow gtid lookup through thread specific data - (__kmp_gtid_get_specific). Some of the code, especially stat code, - that gets executed in the call to __kmp_internal_end_thread, actually - gets the gtid through the thread specific data. Setting it here seems - rather inelegant and perhaps wrong, but allows __kmp_internal_end_thread - to run smoothly. - todo: get rid of this after we remove the dependence on - __kmp_gtid_get_specific */ - if (gtid >= 0 && KMP_UBER_GTID(gtid)) - __kmp_gtid_set_specific(gtid); -#ifdef KMP_TDATA_GTID - __kmp_gtid = gtid; -#endif __kmp_internal_end_thread(gtid); }