[Openmp-commits] [openmp] [OpenMP] Rename worker threads for improved debuggability (PR #102065)
Shilei Tian via Openmp-commits
openmp-commits at lists.llvm.org
Wed Aug 7 14:29:42 PDT 2024
================
@@ -878,6 +878,13 @@ void __kmp_create_worker(int gtid, kmp_info_t *th, size_t stack_size) {
KMP_SYSFAIL("pthread_create", status);
}
+#if defined(KMP_OS_LINUX) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 12)))
+ // Rename worker threads for improved debuggability
+ if (!KMP_UBER_GTID(gtid)) {
+ pthread_setname_np(handle, "openmp_worker");
----------------
shiltian wrote:
so other glibc version doesn't have this function or it doesn't work?
https://github.com/llvm/llvm-project/pull/102065
More information about the Openmp-commits
mailing list