[Openmp-commits] [PATCH] D90647: [OpenMP] Fix shutdown hang bug
Jonathan Peyton via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Nov 11 11:48:25 PST 2020
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGdd8723d348c9: [OpenMP] Fix shutdown hang/race bug (authored by jlpeyton).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90647/new/
https://reviews.llvm.org/D90647
Files:
openmp/runtime/src/kmp_runtime.cpp
Index: openmp/runtime/src/kmp_runtime.cpp
===================================================================
--- openmp/runtime/src/kmp_runtime.cpp
+++ openmp/runtime/src/kmp_runtime.cpp
@@ -3986,12 +3986,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));
@@ -5829,20 +5823,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);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90647.304610.patch
Type: text/x-patch
Size: 1415 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20201111/0d4a6a8f/attachment-0001.bin>
More information about the Openmp-commits
mailing list