[llvm-branch-commits] [llvm] 4b3cb48 - Change for SLES 11 support.

Bryan Chan via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jun 24 08:40:54 PDT 2020


Author: Varun Jayathirtha
Date: 2020-06-23T06:29:57-04:00
New Revision: 4b3cb48710569c84457aca5659c6eebc9c2faae6

URL: https://github.com/llvm/llvm-project/commit/4b3cb48710569c84457aca5659c6eebc9c2faae6
DIFF: https://github.com/llvm/llvm-project/commit/4b3cb48710569c84457aca5659c6eebc9c2faae6.diff

LOG: Change for SLES 11 support.

Cherry-picked 9d840227b8e054f05ccc0dea90c28a68c47ea8c7:

We don't want to include calls to pthread_[sg]etname_np() as they are
glibc 2.12 functions and SLES uses glibc 2.11 by default.

Added: 
    

Modified: 
    llvm/lib/Support/Unix/Threading.inc

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Support/Unix/Threading.inc b/llvm/lib/Support/Unix/Threading.inc
index afb887fc1096..490184d31c96 100644
--- a/llvm/lib/Support/Unix/Threading.inc
+++ b/llvm/lib/Support/Unix/Threading.inc
@@ -152,6 +152,7 @@ void llvm::set_thread_name(const Twine &Name) {
   if (get_max_thread_name_length() > 0)
     NameStr = NameStr.take_back(get_max_thread_name_length() - 1);
   (void)NameStr;
+#if 0
 #if defined(__linux__)
 #if (defined(__GLIBC__) && defined(_GNU_SOURCE)) || defined(__ANDROID__)
 #if HAVE_PTHREAD_SETNAME_NP
@@ -166,6 +167,7 @@ void llvm::set_thread_name(const Twine &Name) {
 #elif defined(__APPLE__)
   ::pthread_setname_np(NameStr.data());
 #endif
+#endif
 }
 
 void llvm::get_thread_name(SmallVectorImpl<char> &Name) {
@@ -220,6 +222,7 @@ void llvm::get_thread_name(SmallVectorImpl<char> &Name) {
 
   Name.append(buf, buf + strlen(buf));
 #elif defined(__linux__)
+#if 0
 #if HAVE_PTHREAD_GETNAME_NP
   constexpr uint32_t len = get_max_thread_name_length_impl();
   char Buffer[len] = {'\0'};  // FIXME: working around MSan false positive.
@@ -227,6 +230,7 @@ void llvm::get_thread_name(SmallVectorImpl<char> &Name) {
     Name.append(Buffer, Buffer + strlen(Buffer));
 #endif
 #endif
+#endif
 }
 
 SetThreadPriorityResult llvm::set_thread_priority(ThreadPriority Priority) {


        


More information about the llvm-branch-commits mailing list